101131 - Bookmarks Menu on personal toolbar is empty.
Not the best fix but will do for short term. Comments added detailing proposed better solution. r=kerz, sr=hewitt git-svn-id: svn://10.0.0.236/trunk@104792 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -251,6 +251,7 @@ Contributor(s): ______________________________________. -->
|
||||
ondragover="nsDragAndDrop.dragOver(event, bookmarksButtonObserver);"
|
||||
template="bookmarksMenuTemplate">
|
||||
<menupopup onpopuphiding="gDidOpen = false;"
|
||||
onpopupshowing="checkBookmarksMenuTemplateBuilder();"
|
||||
ondragdrop="nsDragAndDrop.drop(event, menuDNDObserver); event.preventBubble();"
|
||||
ondragexit="nsDragAndDrop.dragExit(event, menuDNDObserver); event.preventBubble();"
|
||||
ondragover="nsDragAndDrop.dragOver(event, menuDNDObserver); event.preventBubble();">
|
||||
@@ -261,7 +262,7 @@ Contributor(s): ______________________________________. -->
|
||||
<menuseparator ondragover="event.preventBubble(); return false;"/>
|
||||
<menuitem accesskey="&manBookmarksCmd.accesskey;" key="manBookmarkKb" observes="Browser:ManageBookmark"
|
||||
ondragover="event.preventBubble(); return false;"/>
|
||||
<menuseparator/>
|
||||
<menuseparator id="lastStaticSeparator"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
|
||||
|
||||
@@ -499,5 +499,24 @@ function BM_navigatorLoad(aEvent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// An interim workaround for 101131 - Bookmarks Toolbar button nonfunctional.
|
||||
// This simply checks to see if the bookmark menu is empty (aside from static
|
||||
// items) when it is opened and if it is, prompts a rebuild.
|
||||
// The best fix for this is more time consuming, and relies on document
|
||||
// <template>s without content (referencing a remote <template/> by id)
|
||||
// be noted as 'waiting' for a template to load from somewhere. When the
|
||||
// ::Merge function in nsXULDocument is called and a template node inserted,
|
||||
// the id of the template to be inserted is looked up in the map of waiting
|
||||
// references, and then the template builder hooked up.
|
||||
function checkBookmarksMenuTemplateBuilder()
|
||||
{
|
||||
var lastStaticSeparator = document.getElementById("lastStaticSeparator");
|
||||
if (!lastStaticSeparator.nextSibling) {
|
||||
var button = document.getElementById("bookmarks-button");
|
||||
button.builder.rebuild();
|
||||
}
|
||||
}
|
||||
|
||||
addEventListener("load", BM_navigatorLoad, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user