Closed Bug 227962 Opened 22 years ago Closed 20 years ago

[FIX] accesskey on checkbox element don't work if it has the focus

Categories

(Core :: Layout: Form Controls, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: bugzilla, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Mozilla ignores Reproducible: Always Steps to Reproduce: 1. Set accesskey "a" for a checkbox element 2. viewing the rendered page, Press alt+a, or simply click on the label of the element. 3. The element will be checked and get the focus 4. Press Alt+a again to uncheck it, while it still has the focus Actual Results: Nothing happens Expected Results: toggle the checked state of the element
->Keyboard Navigation
Assignee: events → aaronlev5
Component: Event Handling → Keyboard: Navigation
Assignee: aaronlev5 → form
Status: UNCONFIRMED → NEW
Component: Keyboard: Navigation → Layout: Form Controls
Ever confirmed: true
Keywords: testcase
OS: Windows XP → All
Attached patch Patch rev. 1 — — Splinter Review
The problem is that |EventTargetIn| returns PR_TRUE because the event manager GetEventTargetContent is the same as the label's "for-content" when the "for-content" has been focused. This is not the most beautiful solution, but it fixes the problem...
Another way of solving it would be to check for this case in |EventTargetIn| and return PR_FALSE instead, but I'm not entirely sure what |EventTargetIn| is supposed to do in the first place...
Summary: accesskey on checkbox element don't work if it has the focus → [FIX] accesskey on checkbox element don't work if it has the focus
Hmm.. So the ESM is dispatching an event to the _label_, right? Why is EventTargetIn returning true then?
The fix for bug 234455 fixed this, looks like.
Status: NEW → RESOLVED
Closed: 20 years ago
Depends on: 234455
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: