Skip to content

Pressing spacebar on a checked radio button only fires click in some browsers #4854

@matchu

Description

@matchu

http://jsbin.com/yiyusuwuco/1/edit?js,console,output

  1. Focus the textbox.
  2. Press shift-tab to move focus into the radio button group.
  3. Press spacebar to check the radio button.
    • Observe a click event in the console.
  4. Press spacebar to redundantly check the radio button.
    • In Chrome 45.0.2454.85 (64-bit, OSX), observe no additional click event in the console.
    • In Firefox 40.0.3 (OSX), observe an additional click event in the console.

This is entirely the browsers' fault, but, since React's Synthetic Event system is trying to fully normalize inconsistencies like this, here's an obscure one for the list :/

I, at least, prefer Firefox's behavior: I expect real clicks and synthetic (keyboard-originated) clicks to have the same conditions for firing.

(Incidentally, this feels to me like it might've been an accident in Chrome rather than an explicit decision. Is there some place to file this bug with them? I feel like that's pretty pie-in-the-sky, though ;P)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions