fix for bug 183890: this bug was introduced by the fix for bug 147878 that

is an addition to fix for bug 138957 (the form submission deferral in JS
handlers to wait for the return value.)
the current patch fixes the bug so that it resets mDeferSubmission false only
if we are in the NS_FORM_SUBMIT event preventig reseting in a bubling phase
of a possible onclick of a submit button/image.

r= jkeiser sr= jst a= brendan
This commit is contained in:
alexsavulov%netscape.com 2002-12-09 19:11:12 +00:00
Родитель c82e7b190b
Коммит 0277d2e7d1
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -297,7 +297,7 @@ protected:
PRPackedBool mGeneratingReset;
/** Whether we are submitting currently */
PRPackedBool mIsSubmitting;
/** Whether the submission was triggered by an Image or Submit*/
/** Whether the submission is to be deferred in case a script triggers it*/
PRPackedBool mDeferSubmission;
/** The pending submission object */
@ -760,7 +760,7 @@ nsHTMLFormElement::HandleDOMEvent(nsIPresContext* aPresContext,
aDOMEvent,
aFlags,
aEventStatus);
if (mDeferSubmission) {
if (mDeferSubmission && aEvent->message == NS_FORM_SUBMIT) {
// let the form know not to defer subsequent submissions
mDeferSubmission = PR_FALSE;
}