mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 01:08:21 +00:00
Make clicking button outside of form not crash (bug 163327), r=alexsavulov@netscape.com, sr=dbaron@fas.harvard.edu
This commit is contained in:
parent
60da39d7ff
commit
60ffc18bd5
@ -501,7 +501,8 @@ nsHTMLButtonElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||
|
||||
case NS_MOUSE_LEFT_CLICK:
|
||||
{
|
||||
if (mType == NS_FORM_BUTTON_SUBMIT || mType == NS_FORM_BUTTON_RESET) {
|
||||
if ((mType == NS_FORM_BUTTON_SUBMIT || mType == NS_FORM_BUTTON_RESET) &&
|
||||
mForm) {
|
||||
nsFormEvent event;
|
||||
event.eventStructType = NS_FORM_EVENT;
|
||||
event.message = (mType == NS_FORM_BUTTON_RESET)
|
||||
|
Loading…
x
Reference in New Issue
Block a user