From 8a3a1251d392bcacda207e2710ec1e6ebd6fd7bf Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 11 Nov 2001 22:52:18 +0000 Subject: [PATCH] Fix pasting into password boxes with middle-mouse paste. Bug 109520, r=fabian, sr=jst git-svn-id: svn://10.0.0.236/trunk@107902 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/content/src/nsHTMLInputElement.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/content/html/content/src/nsHTMLInputElement.cpp b/mozilla/content/html/content/src/nsHTMLInputElement.cpp index 0801cba734d..44a1cb94ab2 100644 --- a/mozilla/content/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInputElement.cpp @@ -1132,7 +1132,8 @@ nsHTMLInputElement::HandleDOMEvent(nsIPresContext* aPresContext, // this event. But to allow middle mouse button paste to work we must allow // middle clicks to go to text fields anyway. PRBool noContentDispatch = aEvent->flags & NS_EVENT_FLAG_NO_CONTENT_DISPATCH; - if (type == NS_FORM_INPUT_TEXT && aEvent->message == NS_MOUSE_MIDDLE_CLICK) { + if ((type == NS_FORM_INPUT_TEXT || type == NS_FORM_INPUT_PASSWORD) && + aEvent->message == NS_MOUSE_MIDDLE_CLICK) { aEvent->flags &= ~NS_EVENT_FLAG_NO_CONTENT_DISPATCH; }