From d319694435ea273100e2ee6db2ff9cec067541c7 Mon Sep 17 00:00:00 2001 From: "sspitzer%mozilla.org" Date: Sat, 7 Jul 2007 01:12:37 +0000 Subject: [PATCH] fix for bug #334244: Click-drag-release on bookmarks toolbar folder drags the folder patch=Steve Won r=dietrich git-svn-id: svn://10.0.0.236/trunk@229469 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/places/content/toolbar.xml | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/mozilla/browser/components/places/content/toolbar.xml b/mozilla/browser/components/places/content/toolbar.xml index bcc3bbe977e..1265fa5da10 100755 --- a/mozilla/browser/components/places/content/toolbar.xml +++ b/mozilla/browser/components/places/content/toolbar.xml @@ -789,20 +789,25 @@ }, onDragStart: function TBV_DO_onDragStart(event, xferData, dragAction) { + if (event.target.localName == "toolbarbutton" && + event.target.getAttribute("type") == "menu") { +#ifdef XP_WIN + // Support folder dragging on the personal toolbar when the user + // holds the "alt" key while they drag (Ctrl+drag has another + // meaning - Copy). This does not appear to work at all on Linux. + if (!event.shiftKey && !event.altKey && !event.ctrlKey) + return false; + event.target.firstChild.hidePopup(); +#else + return; +#endif + } + if (event.ctrlKey) { dragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY; } xferData.data = this._self._controller.getTransferData(dragAction.action); #ifdef XP_WIN - // Support folder dragging on the personal toolbar when the user - // holds the "alt" key while they drag (Ctrl+drag has another - // meaning - Copy). This does not appear to work at all on Linux. - if (event.target.localName == "toolbarbutton" && - event.target.getAttribute("type") == "menu") { - if (!event.shiftKey && !event.altKey && !event.ctrlKey) - return false; - event.target.firstChild.hidePopup(); - } return true; #endif },