Bug 243594

Summary: submit disabled="disabled" doesn't stop form from being posted with ENTER key
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: FormsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bfulgham, cdumez, mathias, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=16886

Description Ahmad Saleem 2022-08-05 10:46:06 PDT
Hi Team,

Going through Chrome bugs - I came across another test cases (actually two of same thing) where Safari 15.6 behave different compared to other browsers.

Chrome Bug - https://bugs.chromium.org/p/chromium/issues/detail?id=37402

Chrome Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=162095

_________

Test Case 1 - https://jsfiddle.net/WEM3x/

STEPS TO REPRODUCE:

1) Open above link and type something in the field

2) After typing - hit "Enter", Safari will navigate and show 404 error.

<< ACTUAL RESULT >>

Safari navigated upon hitting "Enter"

<< EXPEXTED RESULT / OTHER BROWSERS [Chrome Canary 106 and Firefox Nightly 105] >>

Don't navigate and ignore 'Enter'

__________-

Test Case 2 - https://jsfiddle.net/HhAAb/

STEPS TO REPRODUCE:

1) Open above link and type something in the field

2) After typing - hit "Enter", Safari will show dialog box showing 'form submitted'.

<< ACTUAL RESULT >>

Safari will show "form submitted" dialog

<< EXPEXTED RESULT / OTHER BROWSERS [Chrome Canary 106 and Firefox Nightly 105] >>

Does not show any dialog

______

If it is duplicate, please ignore because I tried to find other but only found bug 81422 but it didn't had any test case.

Appreciate if this can be fixed. Thanks!
Comment 1 Ryosuke Niwa 2022-08-07 18:54:53 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3093
Comment 2 EWS 2022-08-08 12:32:24 PDT
Committed 253228@main (7f2b47eeff03): <https://commits.webkit.org/253228@main>

Reviewed commits have been landed. Closing PR #3093 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-08-08 12:33:27 PDT
<rdar://problem/98334912>
Comment 4 Alexey Proskuryakov 2023-04-13 13:36:25 PDT
*** Bug 53296 has been marked as a duplicate of this bug. ***