diff --git a/toolkit/components/satchel/nsFormFillController.cpp b/toolkit/components/satchel/nsFormFillController.cpp index aac1870490..801af3287e 100644 --- a/toolkit/components/satchel/nsFormFillController.cpp +++ b/toolkit/components/satchel/nsFormFillController.cpp @@ -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 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