diff --git a/editor/idl/nsIHTMLObjectResizer.idl b/editor/idl/nsIHTMLObjectResizer.idl
index 90b53ecc6e4..9774b6da1e3 100644
--- a/editor/idl/nsIHTMLObjectResizer.idl
+++ b/editor/idl/nsIHTMLObjectResizer.idl
@@ -41,7 +41,7 @@
interface nsIHTMLObjectResizeListener;
-[scriptable, uuid(b0338f6c-ded3-4c39-a953-56e8bae494f5)]
+[scriptable, uuid(8b396020-69d3-451f-80c1-1a96a7da25a9)]
interface nsIHTMLObjectResizer : nsISupports
{
@@ -88,9 +88,10 @@ interface nsIHTMLObjectResizer : nsISupports
* @param aX [IN] horizontal position of the pointer
* @param aY [IN] vertical position of the pointer
* @param aTarget [IN] the element triggering the event
+ * @param aMouseEvent [IN] the event
*/
void mouseDown(in long aX, in long aY,
- in nsIDOMElement aTarget);
+ in nsIDOMElement aTarget, in nsIDOMEvent aMouseEvent);
/**
* event callback when a mouse button is released
diff --git a/editor/libeditor/html/nsHTMLEditorMouseListener.cpp b/editor/libeditor/html/nsHTMLEditorMouseListener.cpp
index 548c5c898e8..7a4e88e0b1b 100644
--- a/editor/libeditor/html/nsHTMLEditorMouseListener.cpp
+++ b/editor/libeditor/html/nsHTMLEditorMouseListener.cpp
@@ -275,7 +275,7 @@ nsHTMLEditorMouseListener::MouseDown(nsIDOMEvent* aMouseEvent)
PRInt32 clientX, clientY;
mouseEvent->GetClientX(&clientX);
mouseEvent->GetClientY(&clientY);
- objectResizer->MouseDown(clientX, clientY, element);
+ objectResizer->MouseDown(clientX, clientY, element, aMouseEvent);
}
}
diff --git a/editor/libeditor/html/nsHTMLObjectResizer.cpp b/editor/libeditor/html/nsHTMLObjectResizer.cpp
index 96d1e5ad1f7..30dd16d0da9 100644
--- a/editor/libeditor/html/nsHTMLObjectResizer.cpp
+++ b/editor/libeditor/html/nsHTMLObjectResizer.cpp
@@ -623,7 +623,7 @@ nsHTMLEditor::StartResizing(nsIDOMElement *aHandle)
NS_IMETHODIMP
nsHTMLEditor::MouseDown(PRInt32 aClientX, PRInt32 aClientY,
- nsIDOMElement *aTarget)
+ nsIDOMElement *aTarget, nsIDOMEvent* aEvent)
{
PRBool anonElement = PR_FALSE;
if (aTarget && NS_SUCCEEDED(aTarget->HasAttribute(NS_LITERAL_STRING("_moz_anonclass"), &anonElement)))
@@ -634,6 +634,8 @@ nsHTMLEditor::MouseDown(PRInt32 aClientX, PRInt32 aClientY,
if (NS_FAILED(res)) return res;
if (anonclass.EqualsLiteral("mozResizer")) {
// and that element is a resizer, let's start resizing!
+ aEvent->PreventDefault();
+
mOriginalX = aClientX;
mOriginalY = aClientY;
return StartResizing(aTarget);