Closed Bug 327264 Opened 18 years ago Closed 8 years ago

document.onkeydown handler disables all chrome keyboard shortcuts

Categories

(Firefox :: Keyboard Navigation, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bas, Assigned: MatsPalmgren_bugz)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060110 Debian/1.5.dfsg-4 Firefox/1.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060110 Debian/1.5.dfsg-4 Firefox/1.5

If one uses javascript code like this:

function keypressed ()  { alert("foo bar");}
document.onkeydown=keypressed;

in a document, then all keyboard navigation is disabled while viewing this page.  There's no way anymore to close the tab (ctrl-W), open a new one (ctrl-N), or switch to another tab using the keyboard.

Wouldn't it make sense for keys that ar ein use by the gui not to generate an onkeydown event?

Reproducible: Always

Steps to Reproduce:
Attached file Testcase.
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9a1) Gecko/20060215 Firefox/1.6a1
Confirmed. See testcase.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: document.onkeydown javascript disables all keyboard shortcuts → document.onkeydown handler disables all chrome keyboard shortcuts
Keywords: testcase
Assignee: nobody → mats.palmgren
Viewing the testcase, I am able to close it with Ctrl-W.

Firefox 50.0a1 (2016-07-11)
Ubuntu 16.04.1 64-bit

Firefox 47.0
Windows 7 64-bit
Closing as WFM.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: