diff --git a/layout/html/base/src/nsHTMLTagContent.cpp b/layout/html/base/src/nsHTMLTagContent.cpp
index 87be4fd1cf0d..9dd86440a07c 100644
--- a/layout/html/base/src/nsHTMLTagContent.cpp
+++ b/layout/html/base/src/nsHTMLTagContent.cpp
@@ -1110,7 +1110,7 @@ nsresult nsHTMLTagContent::HandleDOMEvent(nsIPresContext& aPresContext,
mEvent.message = NS_MOUSE_LEFT_CLICK;
HandleDOMEvent(aPresContext, &mEvent, nsnull, DOM_EVENT_INIT, mStatus);
- if (mStatus != nsEventStatus_eConsumeNoDefault) {
+ if (nsEventStatus_eConsumeNoDefault != mStatus) {
nsAutoString base, href, target;
GetAttribute(nsString(NS_HTML_BASE_HREF), base);
GetAttribute(nsString("href"), href);
diff --git a/layout/html/forms/src/nsInputFrame.cpp b/layout/html/forms/src/nsInputFrame.cpp
index 786ce35c6ed7..2fafe98e3a04 100644
--- a/layout/html/forms/src/nsInputFrame.cpp
+++ b/layout/html/forms/src/nsInputFrame.cpp
@@ -401,8 +401,17 @@ NS_METHOD nsInputFrame::HandleEvent(nsIPresContext& aPresContext,
float t2p = aPresContext.GetTwipsToPixels();
((nsInput*)mContent)->SetClickPoint(NSTwipsToIntPixels(aEvent->point.x, t2p),
NSTwipsToIntPixels(aEvent->point.y, t2p));
- MouseClicked(&aPresContext);
- //return PR_FALSE;
+
+ nsEventStatus mStatus;
+ nsMouseEvent mEvent;
+ mEvent.eventStructType = NS_MOUSE_EVENT;
+ mEvent.message = NS_MOUSE_LEFT_CLICK;
+ mContent->HandleDOMEvent(aPresContext, &mEvent, nsnull, DOM_EVENT_INIT, mStatus);
+
+ if (nsEventStatus_eConsumeNoDefault != mStatus) {
+ MouseClicked(&aPresContext);
+ //return PR_FALSE;
+ }
}
mLastMouseState = eMouseEnter;
break;