зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d8cd860ae1
Коммит
4f3a971cb3
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче