Skip to content

Allow BUTTON elements to use "data-remote"#213

Closed
glendel wants to merge 1 commit intorails:masterfrom
glendel:master
Closed

Allow BUTTON elements to use "data-remote"#213
glendel wants to merge 1 commit intorails:masterfrom
glendel:master

Conversation

@glendel
Copy link

@glendel glendel commented Oct 15, 2011

Hello there, wonderful adapter. Is it possible to add : ", button[data-remote]" to the "rails.js" file ?

// Select elements bound by jquery-ujs
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote], button[data-remote]',

Thanks

@JangoSteve
Copy link
Member

Unless you want to write a test case, this will have to wait until I get a chance to write one. My concern is that this will conflict in some way with the form button:not(button[type]) part of formInputClickSelector, firing off multiple overlapping handlers.

Is the intention to use this for buttons that are not part of forms?

@JangoSteve
Copy link
Member

Just realized this is adding button to inputChangeSelector, which I don't think is what you actually want. I'm assuming you're asking if remote buttons could be added to do the same thing as remote links (unassociated with forms). This would mean it should be added to linkClickSelector though. Going to close this pull request and start investigating the use-case.

@JangoSteve JangoSteve closed this Aug 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants