Bug 418156 - "Attempting to Drag and Drop in Bookmarks menu results in broken close windows button" [p=bill@wg9s.com (Bill Gianopoulos) r=Mano a1.9b4=beltzner a=blocking-firefox3+]
git-svn-id: svn://10.0.0.236/trunk@246894 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
9d4583a946
commit
7b0e4631ed
@ -381,8 +381,7 @@
|
||||
label="&bookmarksMenu.label;" accesskey="&bookmarksMenu.accesskey;"
|
||||
ondragenter="PlacesMenuDNDController.onBookmarksMenuDragEnter(event);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, BookmarksMenuDropHandler);"
|
||||
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDropHandler);"
|
||||
ondragexit="PlacesMenuDNDController.onDragExit(event);">
|
||||
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDropHandler);">
|
||||
<menupopup id="bookmarksMenuPopup"
|
||||
type="places" asyncinit="true"
|
||||
place="place:folder=2&expandQueries=1"
|
||||
|
||||
@ -817,21 +817,6 @@ var PlacesMenuDNDController = {
|
||||
this._springLoadDelay, [event]);
|
||||
},
|
||||
|
||||
/**
|
||||
* When the user drags out of the Bookmarks Menu or Toolbar, set a timer to
|
||||
* manually close the popup chain that was dragged out of. We need to do this
|
||||
* since the global popup dismissal listener does not handle multiple extant
|
||||
* popup chains well. See bug 332845 for more information.
|
||||
*/
|
||||
onDragExit: function PMDC_onDragExit(event) {
|
||||
// Ensure that we don't set multiple timers if there's one already set.
|
||||
if ("closeTime" in this._timers)
|
||||
return;
|
||||
|
||||
this._setDragTimer("closeTime", this._closePopups,
|
||||
this._springLoadDelay, [event.target]);
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a timer that will fire during a drag and drop operation.
|
||||
* @param id
|
||||
@ -882,38 +867,6 @@ var PlacesMenuDNDController = {
|
||||
node.localName == "toolbarbutton" && node.getAttribute("type") == "menu";
|
||||
},
|
||||
|
||||
/**
|
||||
* Close all pieces of toplevel menu UI in the browser window. Called in
|
||||
* circumstances where there may be multiple chains of menupopups, e.g.
|
||||
* during drag and drop operations between menus, and in context menu-on-
|
||||
* menu situations.
|
||||
*/
|
||||
_closePopups: function PMDC__closePopups(target) {
|
||||
if (PlacesControllerDragHelper.draggingOverChildNode(target))
|
||||
return;
|
||||
|
||||
if ("closeTime" in this._timers)
|
||||
delete this._timers.closeTime;
|
||||
|
||||
// Close the bookmarks menu
|
||||
var bookmarksMenu = document.getElementById("bookmarksMenu");
|
||||
bookmarksMenu.firstChild.hidePopup();
|
||||
|
||||
var bookmarksBar = document.getElementById("bookmarksBarContent");
|
||||
if (bookmarksBar) {
|
||||
// Close the overflow chevron menu and all its children
|
||||
bookmarksBar._chevron.firstChild.hidePopup();
|
||||
|
||||
// Close all popups on the bookmarks toolbar
|
||||
var toolbarItems = bookmarksBar.childNodes;
|
||||
for (var i = 0; i < toolbarItems.length; ++i) {
|
||||
var item = toolbarItems[i]
|
||||
if (this._isContainer(item))
|
||||
item.firstChild.hidePopup();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Opens the Bookmarks Menu when it is dragged over. (This is special-cased,
|
||||
* since the toplevel Bookmarks <menu> is not a member of an existing places
|
||||
|
||||
@ -380,7 +380,6 @@
|
||||
onclick="BookmarksEventHandler.onClick(event);"
|
||||
oncommand="BookmarksEventHandler.onCommand(event);"
|
||||
onpopupshowing="BookmarksEventHandler.onPopupShowing(event);"
|
||||
ondragexit="PlacesMenuDNDController.onDragExit(event);"
|
||||
tooltip="btTooltip"/>
|
||||
</toolbaritem>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user