Bug 268988
| Summary: | The beforeinput event should fire before textInput | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Pieters (:zcorpan) <zcorpan> |
| Component: | HTML Editing | Assignee: | sideshowbarker <mike> |
| Status: | REOPENED | ||
| Severity: | Normal | CC: | ahmad.saleem792, gsnedders, karlcow, mike, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 274500 | ||
| Bug Blocks: | |||
Simon Pieters (:zcorpan)
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
<rdar://problem/123013293>
sideshowbarker
Pull request: https://github.com/WebKit/WebKit/pull/24735
sideshowbarker
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
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
(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
Committed 278971@main (7da094e1da19): <https://commits.webkit.org/278971@main>
Reviewed commits have been landed. Closing PR #24735 and removing active labels.
sideshowbarker
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
Pull request: https://github.com/WebKit/WebKit/pull/28902