mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
4a555e66d7
commit
40511b2e0e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user