зеркало из https://github.com/mozilla/pjs.git
fix for bug 53904 sr=ben, r=timeless
This commit is contained in:
Родитель
136734a2c7
Коммит
e92e70b816
|
@ -45,7 +45,7 @@ var contentAreaDNDObserver = {
|
||||||
// htmlstring will be filled automatically if you fill urlstring
|
// htmlstring will be filled automatically if you fill urlstring
|
||||||
var htmlstring = null;
|
var htmlstring = null;
|
||||||
|
|
||||||
var domselection = window._content.getSelection();
|
var domselection = aEvent.view.getSelection();
|
||||||
if (domselection && !domselection.isCollapsed &&
|
if (domselection && !domselection.isCollapsed &&
|
||||||
domselection.containsNode(draggedNode,false))
|
domselection.containsNode(draggedNode,false))
|
||||||
{
|
{
|
||||||
|
@ -154,11 +154,13 @@ var contentAreaDNDObserver = {
|
||||||
if (aEvent.getPreventDefault())
|
if (aEvent.getPreventDefault())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if the drag originated w/in this content area, bail early. This avoids loading
|
// if the drag originated w/in this content area, bail
|
||||||
// a URL dragged from the content area into the very same content area (which is
|
// early. This avoids loading a URL dragged from the content
|
||||||
// almost never the desired action). This code is a bit too simplistic and may
|
// area into the very same content area (which is almost never
|
||||||
// have problems with nested frames, but that's not my problem ;)
|
// the desired action). This code is a bit too simplistic and
|
||||||
if (aDragSession.sourceDocument == window._content.document) {
|
// may have problems with nested frames, but that's not my
|
||||||
|
// problem ;)
|
||||||
|
if (aDragSession.sourceDocument == aEvent.view.document) {
|
||||||
aDragSession.canDrop = false;
|
aDragSession.canDrop = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче