Closed
Bug 260605
Opened 20 years ago
Closed 20 years ago
Registering new accesskey should clear old entry for same element
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
References
Details
(Keywords: helpwanted)
Attachments
(1 file)
327 bytes,
application/vnd.mozilla.xul+xml
|
Details |
When an accesskey changes dynamically via JavaScript, the old accesskey for that element should no longer work to trigger it.
Assignee | ||
Comment 1•20 years ago
|
||
Press Alt+Q to trigger checkbox. After that, the accesskey is changed to 'B' Alt+B works now, but so does Alt+Q which shoudln't. The problem is that esm:RegisterAccessKey() doesn't look for the element in the hash table and just change that entry if it exists. It adds another entry pointing to the same element. It would require doing a hash table lookup by key rather than value. UnregisterAccesskey doesn't help because it isn't called. By the time AttributeChanged() knows to call RegisterAccessKey the old accesskey value is gone.
Assignee | ||
Updated•20 years ago
|
Keywords: helpwanted
Comment 2•20 years ago
|
||
Isn't this a matter of having SetAttr() unregister the accesskey before setting the attribute (the way this is done for HTML)?
Assignee | ||
Updated•20 years ago
|
Attachment #159492 -
Attachment is patch: false
Attachment #159492 -
Attachment mime type: text/plain → application/xul
Assignee | ||
Updated•20 years ago
|
Attachment #159492 -
Attachment mime type: application/xul → application/vnd.mozilla.xul+xml
Assignee | ||
Comment 3•20 years ago
|
||
I was wrong about several things: - Unregistering does work, just not when the accesskey is stored on an anonymous label such as for a radio button or checkbox - It's handled in nsXULElement::SetAttr() and nsXULElement::UnregisterAccessKey() Patch in bug 260527 fixes this.
Depends on: 260527
Assignee | ||
Comment 4•20 years ago
|
||
Fixed by checkin to bug 260527
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: Keyboard: Navigation → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•