Bug 1183037: Ensure that autocomplete popups can be displayed again after being dismissed the first time. r=mconley draft
authorMike Conley <mconley@mozilla.com>
Mon, 24 Oct 2016 11:43:54 -0400
changeset 428743 6f334e502eec9f25fb1dde6b5db98e9c0b826dba
parent 427560 3f0aeafe59c40c5e92ba9636fa718cf26088e127
child 428744 e0d46353854c42beef011a1d818ca0477ef4374e
child 428949 adea6235f3d8b49cb6b405d692471f35eeb9ba58
push id33411
push usermconley@mozilla.com
push dateMon, 24 Oct 2016 15:45:02 +0000
reviewersmconley
bugs1183037
milestone52.0a1
Bug 1183037: Ensure that autocomplete popups can be displayed again after being dismissed the first time. r=mconley MozReview-Commit-ID: 1MTGIgcWeh4
toolkit/components/satchel/nsFormFillController.cpp
--- a/toolkit/components/satchel/nsFormFillController.cpp
+++ b/toolkit/components/satchel/nsFormFillController.cpp
@@ -1058,18 +1058,19 @@ nsFormFillController::MouseDown(nsIDOMEv
 
   int16_t button;
   mouseEvent->GetButton(&button);
   if (button != 0)
     return NS_OK;
 
   bool isOpen = false;
   GetPopupOpen(&isOpen);
-  if (isOpen)
-    return NS_OK;
+  if (isOpen) {
+    return SetPopupOpen(false);
+  }
 
   nsCOMPtr<nsIAutoCompleteInput> input;
   mController->GetInput(getter_AddRefs(input));
   if (!input)
     return NS_OK;
 
   nsAutoString value;
   input->GetTextValue(value);