Closed Bug 586961 Opened 14 years ago Closed 14 years ago

Access key on label clicks label, not controlled element

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b5
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: neil, Assigned: Felipe)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Steps to reproduce problem: 1. Open Bookmarks Organiser 2. Select a bookmark 3. Press Alt+E to attempt to expand the info pane Expected result: info pane expands Actual result: expander focused PerformAccessKey is calling ClickWithInputSource on the wrong element.
Although even if I hack PerformAccessKey to call ClickWithInputSource on the correct element, it only works the first time for some reason...
Felipe, could you look at this.
Yes, patch coming. I've debugged the "only works the first time" problem, and it's unrelated and happens on 3.6 as well. The problem is that the More/Less control changes the accesskey when changing the text. After a sequence of register/unregister accesskey and frame construction/destruction, somehow the label ends up with the accesskey registered twice, and then this loop fails: http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsEventStateManager.cpp?mark=1466,1471-1476#1466 because it finds the accesskey but finds another one on the inner _while_, and disables activation. This should probably be for another bug, right?
Assignee: nobody → felipc
Status: NEW → ASSIGNED
(In reply to comment #3) > I've debugged the "only works the first time" problem, and it's unrelated and > happens on 3.6 as well. > This should probably be for another bug, right? Yes, this bug only covers any regressions from bug 547996.
Attached patch Patch (obsolete) — Splinter Review
Neil, are you the right person to review this?
Attachment #465940 - Flags: review?(neil)
Comment on attachment 465940 [details] [diff] [review] Patch >+ nsXULElement* xulElm = FromContent(content); Since elm is already an nsIDOMXULElement, is it worth making elm itself the nsXULElement* elm = FromContent(content) instead? (Note: this will cause issues with do_QueryInterface. Either remove it or substitute content for elm.)
Attached patch Patch v2Splinter Review
> >+ nsXULElement* xulElm = FromContent(content); > Since elm is already an nsIDOMXULElement, is it worth making elm itself the > nsXULElement* elm = FromContent(content) instead? (Note: this will cause issues > with do_QueryInterface. Either remove it or substitute content for elm.) Thanks, that's much better. AIUI _elm_ doesn't need to be a nsCOMPtr since _content_ already is and lives during the entire function. Is that right?
Attachment #465940 - Attachment is obsolete: true
Attachment #467826 - Flags: review?(neil)
Attachment #465940 - Flags: review?(neil)
Attachment #467826 - Flags: review?(neil) → review+
(In reply to comment #7) > AIUI _elm_ doesn't need to be a nsCOMPtr since _content_ already is and lives > during the entire function. Is that right? elm was only an nsCOMPtr before because do_QueryInterface needed it.
(In reply to comment #1) > Although even if I hack PerformAccessKey to call ClickWithInputSource on the > correct element, it only works the first time for some reason... I guess I still need to file a separate bug on this...
I filed bug 589328 on the access key only working the first time issue.
Comment on attachment 467826 [details] [diff] [review] Patch v2 Requesting approval2.0. Simple patch with tests to fix a regression on accesskeys.
Attachment #467826 - Flags: approval2.0?
blocking2.0: --- → betaN+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: