NEW 99712
Submit-buttons containing other elements does not trigger form submission
https://bugs.webkit.org/show_bug.cgi?id=99712
Summary Submit-buttons containing other elements does not trigger form submission
benjamin Horsleben
Reported 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.
Attachments
same test as attachment (287 bytes, text/html)
2012-10-19 13:14 PDT, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2012-10-19 13:13:20 PDT
See also: bug 16868, bug 89041.
Alexey Proskuryakov
Comment 2 2012-10-19 13:13:50 PDT
Bug 15696, not 16868.
Alexey Proskuryakov
Comment 3 2012-10-19 13:14:08 PDT
Created attachment 169684 [details] same test as attachment
Ahmad Saleem
Comment 4 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!
Note You need to log in before you can comment on or make changes to this bug.