mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
fix for bug #334244: Click-drag-release on bookmarks toolbar folder drags the folder
patch=Steve Won <swon@mozilla.com> r=dietrich
This commit is contained in:
parent
d610c681d0
commit
a2f891b8b3
@ -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
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user