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
This commit is contained in:
jkeiser%netscape.com
2003-02-22 08:12:11 +00:00
parent e7babfc916
commit 67e45eafda

View File

@@ -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<nsIDOMEventTarget> target;
res = aMouseEvent->GetTarget(getter_AddRefs(target));
nsCOMPtr<nsIDOMNSEvent> internalEvent = do_QueryInterface(aMouseEvent);
res = internalEvent->GetExplicitOriginalTarget(getter_AddRefs(target));
if (NS_FAILED(res)) return res;
if (!target) return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(target);