WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
268988
The beforeinput event should fire before textInput
https://bugs.webkit.org/show_bug.cgi?id=268988
Summary
The beforeinput event should fire before textInput
Simon Pieters (:zcorpan)
Reported
2024-02-08 07:58:09 PST
WebKit fires the textInput event before the beforeinput event when typing in an <input>, <textarea> or <div contenteditable>. Chromium fires beforeinput first, which matches the proposed spec. Spec:
https://github.com/w3c/uievents/pull/362
Tests:
https://github.com/web-platform-tests/wpt/pull/44472
Test results:
https://wpt.fyi/results/uievents/textInput/api.html?label=pr_head&max-count=1&pr=44472
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-02-15 07:59:28 PST
<
rdar://problem/123013293
>
sideshowbarker
Comment 2
2024-02-19 04:19:28 PST
Pull request:
https://github.com/WebKit/WebKit/pull/24735
sideshowbarker
Comment 3
2024-02-19 10:08:53 PST
I believe the patch in
https://github.com/WebKit/WebKit/pull/24735
could fix this, but I don’t have any way to test it against the
https://github.com/web-platform-tests/wpt/pull/44472
tests with my build — because the tests time out unexpectedly. From chatting with Sam, I’ve gleaned that the unexpected time out might be due to testdriver having not yet implemented something that the WPT tests rely on. The wpt.fyi runner apparently instead uses the WebDriver implementation in wptrunner, which does implement what the WPT tests rely on.
sideshowbarker
Comment 4
2024-02-19 10:43:49 PST
Don’t the existing WebKit test results at
https://github.com/WebKit/WebKit/blob/main/LayoutTests/fast/events/input-events-fired-when-typing-expected.txt
actually indicate that WebKit is already actually firing the beforeinput first, as expected?
sideshowbarker
Comment 5
2024-02-19 21:02:55 PST
(In reply to sideshowbarker from
comment #4
)
> Don’t the existing WebKit test results at >
https://github.com/WebKit/WebKit/blob/main/LayoutTests/fast/events/input
- > events-fired-when-typing-expected.txt actually indicate that WebKit is > already actually firing the beforeinput first, as expected?
Nevermind — that test as currently written doesn’t actually check for the textInput event at all. And when I modify it locally to add a check for the textInput event, I can see it too shows that textInput is getting fired before beforeinput.
EWS
Comment 6
2024-05-19 15:43:56 PDT
Committed
278971@main
(7da094e1da19): <
https://commits.webkit.org/278971@main
> Reviewed commits have been landed. Closing PR #24735 and removing active labels.
sideshowbarker
Comment 7
2024-05-21 21:45:03 PDT
Reopened Bugzilla. REGRESSION (
278971@main
): [iOS] Form submission does not occur when pressing the return key, tracking revert in
https://bugs.webkit.org/show_bug.cgi?id=274500
.
sideshowbarker
Comment 8
2024-05-22 00:06:08 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/28902
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug