for bug 39326, don't load urls dragged from the same content area.

This commit is contained in:
pinkerton%netscape.com 2000-07-31 21:35:01 +00:00
Родитель 228a9db3e0
Коммит e7c124aeec
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -235,6 +235,13 @@ var contentAreaDNDObserver = {
onDrop: function (aEvent, aData, aDragSession)
{
// if the drag originated w/in this content area, bail early. This avoids loading
// a URL dragged from the content area into the very same content area (which is
// almost never the desired action). This code is a bit too simplistic and may
// have problems with nested frames, but that's not my problem ;)
if ( aDragSession.sourceDocument == window._content.document )
return;
var aData = aData.length ? aData[0] : aData;
var url = retrieveURLFromData(aData);
if (url.length == 0)
@ -251,7 +258,6 @@ var contentAreaDNDObserver = {
getSupportedFlavours: function ()
{
dump("*** get supported flavours\n");
var flavourList = { };
//flavourList["moz/toolbaritem"] = { width: 2 };
flavourList["text/unicode"] = { width: 2, iid: "nsISupportsWString" };