Closed
Bug 660069
Opened 15 years ago
Closed 2 years ago
Provide an "id" for the sidebar close button XUL element
Categories
(Firefox :: Toolbars and Customization, enhancement)
Firefox
Toolbars and Customization
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mozdev, Unassigned)
Details
(Whiteboard: [bugday-2011-05-27])
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
In the context of extension development it is often needed to listen to the closing of the Firefox sidebar. An easy way to do so is to listen on events on the sidebar close button. Alas this button has no "id", thus one has to use a query selector to get this XUL element.
Reproducible: Always
Actual Results:
var sidebar_closebutton = top.document.querySelector('#sidebar-box toolbarbutton');
sidebar_closebutton.addEventListener('command', reactToClosing, false);
Expected Results:
If the sidebar close button XUL element could have an ID such as "sidebar-closebutton" extension developers could add listeners to it in a much more robust manner without relying on somehow implementation details like that:
var sidebar_closebutton = top.document.getElementById('sidebar-closebutton');
sidebar_closebutton.addEventListener('command', reactToClosing, false);
As you see this is just a suggestion of a small addition that is fully compatible with both past and future.
Thanks a lot if this little id attribute could be added!
Status: UNCONFIRMED → NEW
Component: General → Toolbars
Ever confirmed: true
QA Contact: general → toolbars
Whiteboard: [bugday-2011-05-27]
Version: unspecified → Trunk
| Reporter | ||
Comment 1•8 years ago
|
||
XUL is not (to be) used anymore.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Comment 2•8 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Resolution: WONTFIX → INACTIVE
And? Whatever other non-XUL element will replace the button (possibly html element), it may still have an ID.
Updated•8 years ago
|
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Updated•3 years ago
|
Severity: normal → S3
Comment 4•2 years ago
|
||
This seems to be the case now (id="sidebar-close")
Status: REOPENED → RESOLVED
Closed: 8 years ago → 2 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•