From a034784dfa3c6b3f0dd535174c9eac946aeb32e8 Mon Sep 17 00:00:00 2001 From: "martijn.martijn@gmail.com" Date: Tue, 2 Oct 2007 07:50:51 -0700 Subject: [PATCH] Bug 398143 - Dragging scrollbar with mouse while autocomplete input has focus triggers autocomplete, r=mano, a=mconnor --- toolkit/components/satchel/src/nsFormFillController.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toolkit/components/satchel/src/nsFormFillController.cpp b/toolkit/components/satchel/src/nsFormFillController.cpp index d97a93c5abe4..71781ad3d803 100644 --- a/toolkit/components/satchel/src/nsFormFillController.cpp +++ b/toolkit/components/satchel/src/nsFormFillController.cpp @@ -791,6 +791,12 @@ nsFormFillController::MouseDown(nsIDOMEvent* aMouseEvent) if (!mouseEvent) return NS_ERROR_FAILURE; + nsCOMPtr target; + aMouseEvent->GetTarget(getter_AddRefs(target)); + nsCOMPtr targetInput = do_QueryInterface(target); + if (!targetInput) + return NS_OK; + PRUint16 button; mouseEvent->GetButton(&button); if (button != 0)