зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c82e7b190b
Коммит
0277d2e7d1
|
@ -297,7 +297,7 @@ protected:
|
||||||
PRPackedBool mGeneratingReset;
|
PRPackedBool mGeneratingReset;
|
||||||
/** Whether we are submitting currently */
|
/** Whether we are submitting currently */
|
||||||
PRPackedBool mIsSubmitting;
|
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;
|
PRPackedBool mDeferSubmission;
|
||||||
|
|
||||||
/** The pending submission object */
|
/** The pending submission object */
|
||||||
|
@ -760,7 +760,7 @@ nsHTMLFormElement::HandleDOMEvent(nsIPresContext* aPresContext,
|
||||||
aDOMEvent,
|
aDOMEvent,
|
||||||
aFlags,
|
aFlags,
|
||||||
aEventStatus);
|
aEventStatus);
|
||||||
if (mDeferSubmission) {
|
if (mDeferSubmission && aEvent->message == NS_FORM_SUBMIT) {
|
||||||
// let the form know not to defer subsequent submissions
|
// let the form know not to defer subsequent submissions
|
||||||
mDeferSubmission = PR_FALSE;
|
mDeferSubmission = PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче