-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tab key select radio button in buttons group in form submits no data #16223
Comments
Note that in your code, the visa radio button should have the |
http://jsfiddle.net/L9fep626/7/ for the fixed example with pre-selected "visa" radio button (ignoring the automated moaning about |
doing some more digging into the specifics of this issue, it seems that the culprit is
in button.js. it's necessary when interacting with the mouse, but this effectively undoes the change of reduced test case, with just the radio buttons and inclusion of the unminified bootstrap.js (so you can set a breakpoint on that particular line...see how when navigating with keyboard, the radio button changes when it reaches the breakpoint...and then when proceeding it gets reset) http://jsfiddle.net/L9fep626/10/ [edit: manually deleted the automated validation comments here as they were muddying the waters] |
actually, tell a lie...it's the
which is suppressing the standard keyboard behavior...but I'm guessing that this is necessary for situations where an element with a default behavior (such as a link) has been turned into a toggle? any way to differentiate, and not fire the |
Updated to use Bootstrap v3.3.4 instead of v3.2.0: http://jsfiddle.net/L9fep626/13/ |
This PR fixes the keyboard navigation again while still keeping twbs#16223 fixed. Closes twbs#19192
reduced test case:
http://jsfiddle.net/L9fep626/3/
This is a sample form I created using radio buttons following the example in http://getbootstrap.com/javascript/#buttons-checkbox-radio
What I found weird is that, if I
press left/right button and space as one would expect to select a radio button, then
This is in contrast to using mouse to select radio button, the selected radio button will be captured and shown in $_POST data.
I would assume, the latter one is the expected behaviour of selecting a button even using keyboard. I have put in a console.log() at onchange event of each radio input, and both keyboard and mouse show that button checked is true.
This is tested on current version of Chrome and Firefox on Ubuntu.
Is this a misbehaviour due to Bootstrap code?
(http://jsfiddle.net/3j2nt0hz/1/ exactly the same html but disabling bootstrap, it works both using keyboard tab-arrowing and mouse clicking).
I would like to investigate what's going on when I [tab] and press arrow key, as contrast to clicking the mouse. How do I do that?
The text was updated successfully, but these errors were encountered: