mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug 601917 - Trying to drag the empty part of a toolbar shouldn't throw an exception. r=enn
--HG-- extra : rebase_source : 466d49a2ea9bd98d3ffb9a3417aaf29688f81171
This commit is contained in:
parent
033af1bf91
commit
926db39604
@ -739,15 +739,17 @@ function onToolbarDragExit(aEvent)
|
||||
|
||||
function onToolbarDragStart(aEvent)
|
||||
{
|
||||
var documentId = gToolboxDocument.documentElement.id;
|
||||
|
||||
var item = aEvent.target;
|
||||
while (item && item.localName != "toolbarpaletteitem")
|
||||
while (item && item.localName != "toolbarpaletteitem") {
|
||||
if (item.localName == "toolbar")
|
||||
return;
|
||||
item = item.parentNode;
|
||||
}
|
||||
|
||||
item.setAttribute("dragactive", "true");
|
||||
|
||||
var dt = aEvent.dataTransfer;
|
||||
var documentId = gToolboxDocument.documentElement.id;
|
||||
dt.setData("text/toolbarwrapper-id/" + documentId, item.firstChild.id);
|
||||
dt.effectAllowed = "move";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user