Bug 99712 - Submit-buttons containing other elements does not trigger form submission
Summary: Submit-buttons containing other elements does not trigger form submission
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://junk.fizkerinc.dk/bugs/webkit-...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-18 06:09 PDT by benjamin Horsleben
Modified: 2023-05-25 11:51 PDT (History)
2 users (show)

See Also:


Attachments
same test as attachment (287 bytes, text/html)
2012-10-19 13:14 PDT, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!