зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1109800 - Call CancelLongTapDetector when Selection carets are blurred. r=roc
This commit is contained in:
Родитель
cab58b9fec
Коммит
0b3d49e12b
|
@ -1614,11 +1614,6 @@ nsFocusManager::Blur(nsPIDOMWindow* aWindowToClear,
|
|||
return true;
|
||||
}
|
||||
|
||||
nsRefPtr<SelectionCarets> selectionCarets = presShell->GetSelectionCarets();
|
||||
if (selectionCarets) {
|
||||
selectionCarets->NotifyBlur();
|
||||
}
|
||||
|
||||
bool clearFirstBlurEvent = false;
|
||||
if (!mFirstBlurEvent) {
|
||||
mFirstBlurEvent = content;
|
||||
|
@ -1688,8 +1683,14 @@ nsFocusManager::Blur(nsPIDOMWindow* aWindowToClear,
|
|||
|
||||
// if we are leaving the document or the window was lowered, make the caret
|
||||
// invisible.
|
||||
if (aIsLeavingDocument || !mActiveWindow)
|
||||
if (aIsLeavingDocument || !mActiveWindow) {
|
||||
SetCaretVisible(presShell, false, nullptr);
|
||||
nsRefPtr<SelectionCarets> selectionCarets = presShell->GetSelectionCarets();
|
||||
if (selectionCarets) {
|
||||
selectionCarets->NotifyBlur();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// at this point, it is expected that this window will be still be
|
||||
// focused, but the focused content will be null, as it was cleared before
|
||||
|
|
|
@ -1086,6 +1086,7 @@ void
|
|||
SelectionCarets::NotifyBlur()
|
||||
{
|
||||
SetVisibility(false);
|
||||
CancelLongTapDetector();
|
||||
DispatchSelectionStateChangedEvent(nullptr, SelectionState::Blur);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче