Closed Bug 478942 Opened 15 years ago Closed 15 years ago

Reveal-tabs button in browser.xul cannot be overlaid correctly by extension xul

Categories

(Firefox for Android Graveyard :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jono, Unassigned)

Details

Attachments

(2 files)

In Fennec's browser.xul, there is a button defined like this:

<toolbarbutton id="retrievetab-button" command="" hidden="false"/>

In Weave, I'm trying to overlay this button with XUL, to make it visible and to assign it a command ID.  I do like this:

 <toolbarbutton id="retrievetab-button" command="cmd_showSyncedTabs" hidden="false"/>

The button appears (i.e. is no longer hidden), but clicking it does nothing and DOM inspection shows that its command attribute is still "", i.e. has not been overridden.

When I removed command="" from the underlying XUL (so that no command attribute is specified), the overlay works correctly.  Conclusion: having the command attribute set to an empty string in the base file prevents it from being overlaid, for some reason.

I've attached a patch which simply deletes the command attribute in the base XUL, so the overlay will work.
Per mfinkle's suggestion, this patch takes the button out of the base file entirely so it can be added fresh in the overlay.  I added an id to the enclosing hbox so that the overlay can put the button in the right place.
Attachment #362775 - Attachment is patch: true
Attachment #362775 - Attachment mime type: application/octet-stream → text/plain
Attachment #362775 - Flags: review?
Comment on attachment 362775 [details] [diff] [review]
Revised patch: removes button and adds id to hbox instead


>-      <hbox>
>+      <hbox id="tab-utils-button-set">

In an attempt to be consistent, I think we'll call this hbox "tabs-controls" since we use "xxx-controls" for the browser toolbarbuttons and the panel toolbatbuttons.

That change when I (or whomever) land this
Attachment #362775 - Flags: review? → review+
http://hg.mozilla.org/mobile-browser/rev/eddcbaa65df8
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: