Closed Bug 186873 Opened 22 years ago Closed 22 years ago

Incorrect charCode comparison in button.xml

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

Details

Attachments

(1 file)

As reported by Neil earlier, charCode is an integer value.

Therefore,
if (event.charCode <= ' ')

should be 

if (event.charCode <= 32)
Without this fix, keys that cannot be accesskeys will trigger accesskey search
in buttons.
Comment on attachment 110191 [details] [diff] [review]
Fixes charCode comparison

Can charCode ever be < 0 ?
Attachment #110191 - Flags: superreview?(hewitt)
Attachment #110191 - Flags: review?(neil)
Comment on attachment 110191 [details] [diff] [review]
Fixes charCode comparison

No, charCode is a PRUint32
Attachment #110191 - Flags: review?(neil) → review+
Attachment #110191 - Flags: superreview?(hewitt) → superreview?(jaggernaut)
Comment on attachment 110191 [details] [diff] [review]
Fixes charCode comparison

sr=jag
Attachment #110191 - Flags: superreview?(jaggernaut) → superreview+
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
rs vrfy
Status: RESOLVED → VERIFIED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: