RESOLVED FIXED Bug 221532
[macOS] Return key binding for date inputs conflicts with return to submit form
https://bugs.webkit.org/show_bug.cgi?id=221532
Summary [macOS] Return key binding for date inputs conflicts with return to submit form
Aditya Keerthi
Reported 2021-02-07 13:11:09 PST
Steps To Reproduce: 1. Go to https://www.w3schools.com/TAGS/tryit.asp?filename=tryhtml5_input_type_date 2. Press shift-TAB to focus the birthday field 3. Type a date 4. Press return Observe that the calendar view is presented, and the form is not submitted.
Attachments
Patch (19.59 KB, patch)
2021-02-07 13:13 PST, Aditya Keerthi
wenson_hsieh: review+
ews-feeder: commit-queue-
Patch (19.56 KB, patch)
2021-02-07 13:58 PST, Aditya Keerthi
no flags
Patch for landing (22.66 KB, patch)
2021-02-07 14:03 PST, Aditya Keerthi
no flags
Aditya Keerthi
Comment 1 2021-02-07 13:11:24 PST
Aditya Keerthi
Comment 2 2021-02-07 13:13:37 PST
Wenson Hsieh
Comment 3 2021-02-07 13:30:17 PST
Comment on attachment 419544 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419544&action=review > Source/WebCore/html/BaseDateAndTimeInputType.cpp:421 > + int charCode = event.charCode(); Nit - I'm not sure the local variable adds much here. Maybe just check (event.charCode() == '\r') below?
Aditya Keerthi
Comment 4 2021-02-07 13:58:18 PST
Aditya Keerthi
Comment 5 2021-02-07 14:03:12 PST
Created attachment 419547 [details] Patch for landing
Aditya Keerthi
Comment 6 2021-02-07 14:03:55 PST
(In reply to Wenson Hsieh from comment #3) > Comment on attachment 419544 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=419544&action=review > > > Source/WebCore/html/BaseDateAndTimeInputType.cpp:421 > > + int charCode = event.charCode(); > > Nit - I'm not sure the local variable adds much here. Maybe just check > (event.charCode() == '\r') below? Removed the local variable. Thanks for the review!
EWS
Comment 7 2021-02-08 07:13:49 PST
commit-queue failed to commit attachment 419547 [details] to WebKit repository. To retry, please set cq+ flag again.
EWS
Comment 8 2021-02-08 07:37:08 PST
commit-queue failed to commit attachment 419547 [details] to WebKit repository. To retry, please set cq+ flag again.
EWS
Comment 9 2021-02-08 08:42:17 PST
Committed r272495: <https://commits.webkit.org/r272495> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419547 [details].
Note You need to log in before you can comment on or make changes to this bug.