зеркало из https://github.com/mozilla/gecko-dev.git
Bug 541520, don't fire dragleave on successful drop, but do fire it when drop fails or is cancelled, r=jonas,smichaud
This commit is contained in:
Родитель
cfa94da201
Коммит
38e1e5bdc9
|
@ -1133,7 +1133,6 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
KillClickHoldTimer();
|
||||
break;
|
||||
#endif
|
||||
case NS_DRAGDROP_DROP:
|
||||
case NS_DRAGDROP_OVER:
|
||||
// NS_DRAGDROP_DROP is fired before NS_DRAGDROP_DRAGDROP so send
|
||||
// the enter/exit events before NS_DRAGDROP_DROP.
|
||||
|
@ -3629,7 +3628,6 @@ nsEventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
|
|||
}
|
||||
break;
|
||||
|
||||
case NS_DRAGDROP_DROP:
|
||||
case NS_DRAGDROP_EXIT:
|
||||
{
|
||||
//This is actually the window mouse exit event.
|
||||
|
|
|
@ -5941,6 +5941,8 @@ static BOOL keyUpAlreadySentKeyDown = NO;
|
|||
// the |canDrop| property of the Drag Session.
|
||||
PRBool canDrop = PR_FALSE;
|
||||
if (!NS_SUCCEEDED(dragSession->GetCanDrop(&canDrop)) || !canDrop) {
|
||||
[self doDragAction:NS_DRAGDROP_EXIT sender:aSender];
|
||||
|
||||
nsCOMPtr<nsIDOMNode> sourceNode;
|
||||
dragSession->GetSourceNode(getter_AddRefs(sourceNode));
|
||||
if (!sourceNode) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче