don't bubble the onDragOver event when we decide that the drop is allowable. This prevents it from being reset by someone else higher up the chain. r=anthonyd. bug# 47428.

This commit is contained in:
pinkerton%netscape.com 2000-08-30 01:18:11 +00:00
parent d8cd860ae1
commit 4f3a971cb3
2 changed files with 6 additions and 2 deletions

View File

@ -655,8 +655,10 @@ nsTextEditorDragListener::DragOver(nsIDOMEvent* aDragEvent)
dragSession->IsDataFlavorSupported(kFileMime, &flavorSupported);
if ( !flavorSupported )
dragSession->IsDataFlavorSupported(kJPEGImageMime, &flavorSupported);
if ( flavorSupported )
if ( flavorSupported ) {
dragSession->SetCanDrop(PR_TRUE);
aDragEvent->PreventBubble();
}
}
}

View File

@ -655,8 +655,10 @@ nsTextEditorDragListener::DragOver(nsIDOMEvent* aDragEvent)
dragSession->IsDataFlavorSupported(kFileMime, &flavorSupported);
if ( !flavorSupported )
dragSession->IsDataFlavorSupported(kJPEGImageMime, &flavorSupported);
if ( flavorSupported )
if ( flavorSupported ) {
dragSession->SetCanDrop(PR_TRUE);
aDragEvent->PreventBubble();
}
}
}