Closed
Bug 586961
Opened 14 years ago
Closed 14 years ago
Access key on label clicks label, not controlled element
Categories
(Core :: XUL, defect)
Core
XUL
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)
4.48 KB,
patch
|
neil
:
review+
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Comment 1•14 years ago
|
||
Although even if I hack PerformAccessKey to call ClickWithInputSource on the correct element, it only works the first time for some reason...
Comment 2•14 years ago
|
||
Felipe, could you look at this.
Assignee | ||
Comment 3•14 years ago
|
||
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
Reporter | ||
Comment 4•14 years ago
|
||
(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.
Assignee | ||
Comment 5•14 years ago
|
||
Neil, are you the right person to review this?
Attachment #465940 -
Flags: review?(neil)
Reporter | ||
Comment 6•14 years ago
|
||
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.)
Assignee | ||
Comment 7•14 years ago
|
||
> >+ 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)
Reporter | ||
Updated•14 years ago
|
Attachment #467826 -
Flags: review?(neil) → review+
Reporter | ||
Comment 8•14 years ago
|
||
(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.
Reporter | ||
Comment 9•14 years ago
|
||
(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...
Reporter | ||
Comment 10•14 years ago
|
||
I filed bug 589328 on the access key only working the first time issue.
Assignee | ||
Comment 11•14 years ago
|
||
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?
Updated•14 years ago
|
blocking2.0: --- → betaN+
Updated•14 years ago
|
Attachment #467826 -
Flags: approval2.0?
Assignee | ||
Comment 12•14 years ago
|
||
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.
Description
•