-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
script: Use InputEvent for input events #39989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a0ba926 to
fc87ed7
Compare
|
Rebased to fix merge conflict. |
|
🔨 Triggering try run (#18670979823) for Linux (WPT) |
|
Test results for linux-wpt from try job (#18670979823): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (24)
|
|
✨ Try run (#18670979823) succeeded. |
jdm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay—this is really great work!
| KeyReaction::DispatchInput | ||
| let ch = event.data().str(); | ||
| self.insert_string(ch.as_ref()); | ||
| KeyReaction::DispatchInput( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, https://w3c.github.io/uievents/#events-composition-input-events says we shouldn't dispatch an input event after compositionend. Let's file a followup issue for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use `InputEvent` for text input and set appropriate values for the `composed`, `data`, `isComposing`, and `inputType` attributes. Use a placeholder for `dataTransfer` attribute and `getTargetRanges` function, as they are only applicable to contenteditable, which isn't implemented. Signed-off-by: Excitable Snowball <excitablesnowball@gmail.com>
Signed-off-by: Excitable Snowball <excitablesnowball@gmail.com>
fc87ed7 to
f5dfa8b
Compare
|
🔨 Triggering try run (#19199267547) for Linux (WPT) |
|
Test results for linux-wpt from try job (#19199267547): Flaky unexpected result (36)
Stable unexpected results that are known to be intermittent (36)
|
|
✨ Try run (#19199267547) succeeded. |
Use
InputEventfor text input and set appropriate values for thecomposed,data,isComposing, andinputTypeattributes. Use a placeholder fordataTransferattribute andgetTargetRangesfunction, as they are only applicable to contenteditable, which isn't implemented.Testing: I added two tests under
tests/wpt/mozilla/tests/input-eventsbased on the similarly named ones for contenteditable undertests/wpt/tests/input-events.Fixes: #36398