mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +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();
|
||||
return NS_OK;
|
||||
}
|
||||
if (type.EqualsLiteral("resize")) {
|
||||
if (mFocusedPopup)
|
||||
mFocusedPopup->ClosePopup();
|
||||
return NS_OK;
|
||||
}
|
||||
if (type.EqualsLiteral("pagehide")) {
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = do_QueryInterface(
|
||||
|
|
@ -1213,6 +1218,8 @@ nsFormFillController::AddWindowListeners(nsPIDOMWindowOuter* aWindow)
|
|||
TrustedEventsAtCapture());
|
||||
elm->AddEventListenerByType(this, NS_LITERAL_STRING("contextmenu"),
|
||||
TrustedEventsAtCapture());
|
||||
elm->AddEventListenerByType(this, NS_LITERAL_STRING("resize"),
|
||||
TrustedEventsAtCapture());
|
||||
|
||||
// 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.
|
||||
|
|
@ -1257,6 +1264,8 @@ nsFormFillController::RemoveWindowListeners(nsPIDOMWindowOuter* aWindow)
|
|||
TrustedEventsAtCapture());
|
||||
elm->RemoveEventListenerByType(this, NS_LITERAL_STRING("contextmenu"),
|
||||
TrustedEventsAtCapture());
|
||||
elm->RemoveEventListenerByType(this, NS_LITERAL_STRING("resize"),
|
||||
TrustedEventsAtCapture());
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue