From 67e45eafda9a294ccacfc02c68020bb707b83375 Mon Sep 17 00:00:00 2001 From: "jkeiser%netscape.com" Date: Sat, 22 Feb 2003 08:12:11 +0000 Subject: [PATCH] Make double-click on text in composer select word again (bug 193689), r=bryner@netscape.com, sr=jst@netscape.com, a=asa@mozilla.org git-svn-id: svn://10.0.0.236/trunk@138161 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/libeditor/html/nsHTMLEditorMouseListener.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorMouseListener.cpp b/mozilla/editor/libeditor/html/nsHTMLEditorMouseListener.cpp index 84ab2bd8264..26b08fa64de 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorMouseListener.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditorMouseListener.cpp @@ -40,6 +40,7 @@ #include "nsString.h" #include "nsIDOMEvent.h" +#include "nsIDOMNSEvent.h" #include "nsIDOMElement.h" #include "nsIDOMMouseEvent.h" #include "nsISelection.h" @@ -113,7 +114,8 @@ nsHTMLEditorMouseListener::MouseDown(nsIDOMEvent* aMouseEvent) if (isContextClick || (buttonNumber == 0 && clickCount == 2)) { nsCOMPtr target; - res = aMouseEvent->GetTarget(getter_AddRefs(target)); + nsCOMPtr internalEvent = do_QueryInterface(aMouseEvent); + res = internalEvent->GetExplicitOriginalTarget(getter_AddRefs(target)); if (NS_FAILED(res)) return res; if (!target) return NS_ERROR_NULL_POINTER; nsCOMPtr element = do_QueryInterface(target);