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);