Bug 99712

Summary: Submit-buttons containing other elements does not trigger form submission
Product: WebKit Reporter: benjamin Horsleben <webkit.bugzilla>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://junk.fizkerinc.dk/bugs/webkit-button-submit.html
See Also: https://bugs.webkit.org/show_bug.cgi?id=89041
Attachments:
Description Flags
same test as attachment none

Description benjamin Horsleben 2012-10-18 06:09:52 PDT
When having a button-element with type=submit contain another element (such as a label), clicking the containing element will not trigger form-submission.

Clicking directly on the button (instead of the child element) will trigger submission as expected.


The example urls shows the minimum code that provokes this error. The form-submission prints the current time in a span after the form, to show that something has happened.


The button does receive click-events properly, so adding 'onclick=this.form.submit()' to the button will make the form submit, but that should not be necessary, and also avoids triggering the submit-event for the form.
Comment 1 Alexey Proskuryakov 2012-10-19 13:13:20 PDT
See also: bug 16868, bug 89041.
Comment 2 Alexey Proskuryakov 2012-10-19 13:13:50 PDT
Bug 15696, not 16868.
Comment 3 Alexey Proskuryakov 2012-10-19 13:14:08 PDT
Created attachment 169684 [details]
same test as attachment
Comment 4 Ahmad Saleem 2023-05-25 11:51:59 PDT
*** Chrome Canary 115 ***

Clicking on 'label' text, does not change anything, clicking outside will trigger and display date.

*** Safari 16.5 / WebKit ToT && Firefox Nightly 115 ***

Clicking on 'label' text or outside boundaries will trigger and display date and change it as needed.

________

Just wanted to share updated test results. Thanks!