Added support for click event on form buttons

This commit is contained in:
joki@netscape.com
1998-08-07 05:19:07 +00:00
parent 6164ebc90e
commit 16645fef06
2 changed files with 12 additions and 3 deletions
+11 -2
View File
@@ -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;