зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 56240, reset selection and mouse capture states when mousedown/mouseup sequence processes abnormally. r:saari, sr:js
This commit is contained in:
Родитель
f973d3920c
Коммит
8bc4a2199b
|
@ -980,6 +980,18 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
//We often get out of sync state issues with mousedown events that
|
||||
//get interrupted by alerts/dialogs.
|
||||
//Check with the ESM to see if we should process this one
|
||||
nsCOMPtr<nsIEventStateManager> esm;
|
||||
aPresContext->GetEventStateManager(getter_AddRefs(esm));
|
||||
if (!esm)
|
||||
return NS_ERROR_FAILURE;
|
||||
PRBool eventOK;
|
||||
esm->EventStatusOK(aEvent, &eventOK);
|
||||
if (!eventOK)
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
|
|
|
@ -980,6 +980,18 @@ nsFrame::HandlePress(nsIPresContext* aPresContext,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
//We often get out of sync state issues with mousedown events that
|
||||
//get interrupted by alerts/dialogs.
|
||||
//Check with the ESM to see if we should process this one
|
||||
nsCOMPtr<nsIEventStateManager> esm;
|
||||
aPresContext->GetEventStateManager(getter_AddRefs(esm));
|
||||
if (!esm)
|
||||
return NS_ERROR_FAILURE;
|
||||
PRBool eventOK;
|
||||
esm->EventStatusOK(aEvent, &eventOK);
|
||||
if (!eventOK)
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
|
|
Загрузка…
Ссылка в новой задаче