mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 19:55:39 +00:00
fix for bug 53904 sr=ben, r=timeless
This commit is contained in:
parent
3f6c047b01
commit
73a2cb5f6c
@ -45,7 +45,7 @@ var contentAreaDNDObserver = {
|
||||
// htmlstring will be filled automatically if you fill urlstring
|
||||
var htmlstring = null;
|
||||
|
||||
var domselection = window._content.getSelection();
|
||||
var domselection = aEvent.view.getSelection();
|
||||
if (domselection && !domselection.isCollapsed &&
|
||||
domselection.containsNode(draggedNode,false))
|
||||
{
|
||||
@ -154,11 +154,13 @@ var contentAreaDNDObserver = {
|
||||
if (aEvent.getPreventDefault())
|
||||
return;
|
||||
|
||||
// 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) {
|
||||
// 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 == aEvent.view.document) {
|
||||
aDragSession.canDrop = false;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user