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:
Dão Gottwald 2011-06-02 22:59:10 +02:00
Родитель 033af1bf91
Коммит 926db39604
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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";
}