mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
[toolkit] Close autocomplete popup when window is resized.
This commit is contained in:
parent
a2417d573b
commit
b4caa69a9c
1 changed files with 9 additions and 0 deletions
|
|
@ -919,6 +919,11 @@ nsFormFillController::HandleEvent(nsIDOMEvent* aEvent)
|
||||||
mFocusedPopup->ClosePopup();
|
mFocusedPopup->ClosePopup();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
if (type.EqualsLiteral("resize")) {
|
||||||
|
if (mFocusedPopup)
|
||||||
|
mFocusedPopup->ClosePopup();
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
if (type.EqualsLiteral("pagehide")) {
|
if (type.EqualsLiteral("pagehide")) {
|
||||||
|
|
||||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(
|
nsCOMPtr<nsIDocument> doc = do_QueryInterface(
|
||||||
|
|
@ -1213,6 +1218,8 @@ nsFormFillController::AddWindowListeners(nsPIDOMWindowOuter* aWindow)
|
||||||
TrustedEventsAtCapture());
|
TrustedEventsAtCapture());
|
||||||
elm->AddEventListenerByType(this, NS_LITERAL_STRING("contextmenu"),
|
elm->AddEventListenerByType(this, NS_LITERAL_STRING("contextmenu"),
|
||||||
TrustedEventsAtCapture());
|
TrustedEventsAtCapture());
|
||||||
|
elm->AddEventListenerByType(this, NS_LITERAL_STRING("resize"),
|
||||||
|
TrustedEventsAtCapture());
|
||||||
|
|
||||||
// Note that any additional listeners added should ensure that they ignore
|
// Note that any additional listeners added should ensure that they ignore
|
||||||
// untrusted events, which might be sent by content that's up to no good.
|
// untrusted events, which might be sent by content that's up to no good.
|
||||||
|
|
@ -1257,6 +1264,8 @@ nsFormFillController::RemoveWindowListeners(nsPIDOMWindowOuter* aWindow)
|
||||||
TrustedEventsAtCapture());
|
TrustedEventsAtCapture());
|
||||||
elm->RemoveEventListenerByType(this, NS_LITERAL_STRING("contextmenu"),
|
elm->RemoveEventListenerByType(this, NS_LITERAL_STRING("contextmenu"),
|
||||||
TrustedEventsAtCapture());
|
TrustedEventsAtCapture());
|
||||||
|
elm->RemoveEventListenerByType(this, NS_LITERAL_STRING("resize"),
|
||||||
|
TrustedEventsAtCapture());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue