Alt+Left to go back should not be intercept-able by the webpage
Categories
(Firefox :: Keyboard Navigation, defect)
Tracking
()
People
(Reporter: samlh+bz2, Unassigned)
Details
Attachments
(1 file)
30.69 KB,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0
Steps to reproduce:
Open a webpage with a keyboard listener that calls event.preventDefault()
Try to go back by pressing Alt+Left
Can be tested with:
- Open https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cscript%20type%3D%22application%2Fjavascript%22%3E%0Adocument.addEventListener(%27keydown%27%2C%20(e)%20%3D%3E%20%7B%20e.preventDefault()%3B%20%7D)%3B%0A%3C%2Fscript%3E%0A%3Cbutton%3EFocus%3C%2Fbutton%3E
- Focus the button
- Try to go back by pressing Alt+Left
Actual results:
The browser does not navigate to the previous page
This stopped working sometime within the last few releases, and it has been bugging me since.
Expected results:
The browser should navigate to the previous page
Also, Ctrl+L to focus the address bar should also not be interceptable by the website.
Happily, Ctrl+Tab or Ctrl+W can let you escape such a page using the keyboard, but I've been hitting this even on non-malicious pages that don't check the Alt key modifier before handling the arrow keys.
Comment 3•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 4•3 years ago
|
||
This behavior seems to be defined in the frontend, not in https://searchfox.org/mozilla-central/source/dom/events/ShortcutKeyDefinitions.cpp
Hi,
thank you for taking the time to submit this bug report.
I was able to reproduce on Windows 10, on Firefox Nightly 93.0a1 (2021-08-23) (64-bit) and Release 91.0.1 (64-bit) versions. Based on this I will mark respective flags as affected and set the severity.
I set the component in order to get the dev team involved, but if it's not relevant,
'Firefox-Keyboard Navigation' team, please feel free to change the component if this is not the appropriate one.
Regards,
Jerónimo.
Comment 6•3 years ago
|
||
Change the status for beta to have the same as nightly and release.
For more information, please visit auto_nag documentation.
Description
•