Closed Bug 1537555 Opened 8 months ago Closed 8 months ago

Form submission button doesn't work on YUI 2.x forms (such as Jenkins CI)

Categories

(Core :: DOM: Core & HTML, defect, major)

68 Branch
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
geckoview66 --- unaffected
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- unaffected
firefox68 blocking fixed

People

(Reporter: MattN, Assigned: smaug)

References

(Blocks 1 open bug, )

Details

(Keywords: regression, site-compat)

Attachments

(1 file)

YUI 2.x's button code to submit a form is broken since bug 1535988 since it does browser detection assuming that browsers will never change behaviour :(

See https://github.com/yui/yui2/blob/067c9f82ecc90e4b392b7cb06a4a4f7fe3f6136e/src/button/js/button.js#L2699-L2720

                /*
                    In IE and Safari, dispatching a "submit" event to a form 
                    WILL cause the form's "submit" event to fire, but WILL NOT 
                    submit the form.  Therefore, we need to call the "submit" 
                    method as well.
                */
              
                if ((UA.ie || UA.webkit) && bSubmitForm) {
        
                    oForm.submit();
                
                }

They don't submit the form for Gecko but they do dispatch their own submit event (isTrusted = false) which no longer works.

I'm reporting this for :jrgm who hit this with Jenkins CI (Cloudbees distribution) heavily used by Mozilla.

[Tracking Requested - why for this release]: Web compat regression on a popular tool

It seems like we may have to revert bug 1535988 as YUI 2 and Jenkins are probably too popular to break even though YUI 2 was last release in 2011

Flags: webcompat?
Flags: needinfo?(bugs)
Summary: Form submission button doesn't work on Jenkins CI forms → Form submission button doesn't work on YUI 2.x forms forms (such as Jenkins CI)

That condition basically means any browser which conforms to the spec but doesn't pretend themselves to be either IE or WebKit would have trouble. That sounds extremely problematic.

I think that means we need to change the spec.

Also if we want synthetic submit event to trigger form submitting, we should at least avoid doing so if it has been preventDefaulted, which doesn't seem to work before bug 1535988.

Submitted a spec issue whatwg/html#4438 for this.

I suggest we revert bug 1535988 and instead have it check whether it is defaultPrevented.

Summary: Form submission button doesn't work on YUI 2.x forms forms (such as Jenkins CI) → Form submission button doesn't work on YUI 2.x forms (such as Jenkins CI)
Duplicate of this bug: 1538137

Backed out bug 1535988 for now.

Flags: needinfo?(bugs)
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
See Also: → 1556980

Though Jenkins has an official fix for this:
What's new in 2.164.3 (2019-05-09)
Make form submit buttons on the Jenkins classic UI compatible with potentially upcoming Firefox bug fix. (issue 53462, Firefox bug 1370630)

Blocks: 1370630
You need to log in before you can comment on or make changes to this bug.