preventDefault does not work on keydown when "space bar" is pressed
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: milko.venkov, Unassigned)
References
Details
(4 keywords)
Attachments
(1 file)
399 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.84
Steps to reproduce:
I have a button and I handled keydown event. In the handler I am calling preventDefault. When the button has focus and I press space bar it also fires click event which is not correct. If the button has focus and I press Enter key click event does not fire.
Click event does not fire in MS IE, MS Edge, Google Chrome and Opera.
Actual results:
Click event fired on space bar press event preventDefault is called
Expected results:
Click event should not fire.
Comment 1•6 years ago
|
||
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
20190516215643
Updated•6 years ago
|
Updated•6 years ago
|
The bug doesn't seem to be resolved, though marked as duplicate, it exists in Firefox 72. On trying to handle keydown event, it still executes keydown and then click event.
Comment 4•6 years ago
|
||
(In reply to ammumaddineni97 from comment #3)
The bug doesn't seem to be resolved, though marked as duplicate
You can clearly see it's a duplicate of a report that's still open.
Description
•