Bug 236324

Summary: Clicking on an <input type="image"> will submit the form with null submitter
Product: WebKit Reporter: Andreu Botella <andreu>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cgarcia, changseok, clopez, esprehn+autocc, ews-watchlist, gyuyoung.kim, mifenton, webkit-bug-importer, wenson_hsieh, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/32755
Bug Depends on:    
Bug Blocks: 234069    
Attachments:
Description Flags
Patch
none
Patch none

Description Andreu Botella 2022-02-08 13:06:50 PST
If you submit a form by clicking on an <input type="image"> control, the x and y position of the click will be in the form's entry list, but the submitter field in the submit event will be null.

Per the spec, this is not supposed to happen, since step 6 in the image input activation behavior (https://html.spec.whatwg.org/multipage/input.html#image-button-state-(type=image):input-activation-behavior) runs the form submission algorithm "from the element", i.e. with the <input type="image"> element as the submitter.
Comment 1 Andreu Botella 2022-02-08 13:17:26 PST
Created attachment 451299 [details]
Patch
Comment 2 EWS Watchlist 2022-02-08 13:19:23 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 Andreu Botella 2022-02-08 13:30:16 PST
Opened https://github.com/web-platform-tests/wpt/pull/32755 for the WPT change.
Comment 4 EWS 2022-02-11 01:05:05 PST
/Volumes/Data/worker/Commit-Queue/build/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Comment 5 Andreu Botella 2022-02-11 01:23:47 PST
Created attachment 451658 [details]
Patch
Comment 6 EWS 2022-02-11 02:53:54 PST
Committed r289615 (247126@main): <https://commits.webkit.org/247126@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451658 [details].
Comment 7 Radar WebKit Bug Importer 2022-02-11 02:54:28 PST
<rdar://problem/88807036>