Bug 418156 - Attempting to Drag and Drop in Bookmarks menu results in broken close windows button. patch by Bill Gianopoulos <bill@wg9s.com>, r=me.
authormozilla.mano@sent.com
Sat, 01 Mar 2008 05:49:39 -0800
changeset 12465 42ab26ce102bb3db5e4932844af51387e7d04ee5
parent 12464 e1370dde58160f72f4cc6589c55eb5eee46431d3
child 12466 b24e0a98185a7544bc311a0254ad7154189ec072
push idunknown
push userunknown
push dateunknown
reviewersme
bugs418156
milestone1.9b4pre
Bug 418156 - Attempting to Drag and Drop in Bookmarks menu results in broken close windows button. patch by Bill Gianopoulos <bill@wg9s.com>, r=me.
browser/base/content/browser-menubar.inc
browser/base/content/browser-places.js
browser/base/content/browser.xul
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -376,18 +376,17 @@
                 </menu>
               </menupopup>
             </menu>
 
   <menu id="bookmarksMenu" 
         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&amp;expandQueries=1"
                context="placesContext"
                openInTabs="children"
                oncommand="BookmarksEventHandler.onCommand(event);"
                onclick="BookmarksEventHandler.onClick(event);"
                onpopupshowing="BookmarksEventHandler.onPopupShowing(event);">
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -813,31 +813,16 @@ var PlacesMenuDNDController = {
     if ("loadTime" in this._timers) 
       return;
     
     this._setDragTimer("loadTime", this._openBookmarksMenu, 
                        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
    *          The identifier of the timer being set
    * @param   callback
    *          The function to call when the timer "fires"
    * @param   delay
    *          The time to wait before calling the callback function
    * @param   args
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -375,17 +375,16 @@
       </toolbaritem>
 
       <toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;">
          <hbox id="bookmarksBarContent" flex="1" type="places"
                context="placesContext" asyncinit="true"
                onclick="BookmarksEventHandler.onClick(event);"
                oncommand="BookmarksEventHandler.onCommand(event);"
                onpopupshowing="BookmarksEventHandler.onPopupShowing(event);"
-               ondragexit="PlacesMenuDNDController.onDragExit(event);"
                tooltip="btTooltip"/>
       </toolbaritem>
 
         <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                        observes="Tools:Downloads"
                        ondragdrop="nsDragAndDrop.drop(event, DownloadsButtonDNDObserver); event.stopPropagation()"
                        ondragover="nsDragAndDrop.dragOver(event, DownloadsButtonDNDObserver); event.stopPropagation()"
                        ondragenter="nsDragAndDrop.dragEnter(event, DownloadsButtonDNDObserver); event.stopPropagation()"