-
Notifications
You must be signed in to change notification settings - Fork 3
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
Input events #3
Comments
Please let me know if the summary as written isn't right, doesn't cover something important, or covers something it shouldn't. |
An issue we'd like to nominate for inclusion here is w3c/uievents#202 which led to https://bugzilla.mozilla.org/show_bug.cgi?id=1511157 and is related to https://bugs.chromium.org/p/chromium/issues/detail?id=929404 |
From our point of view, getting that issue resolved would be a sufficient goal for this part of the project. |
Another interesting issue might be aligning whether events are dispatched when deleting backwards in an empty contenteditable or text field; when focusing the In both Firefox and Chrome on macOS, the |
Currently, Firefox does not check strictly whether On the other hand, For consistency with the clipboard events, dispatching only And it seems that browsers should dispatch |
At TPAC, the Editing Working Group decided to move the event order of composition and input events into the uievents spec. So this is currently part of the TODO list of @garykac [1]. Also, the question of whether the last beforeinput event of a composition should be cancelable is still unresolved [2]. So based on that I am not sure whether it is actually possible to present tests rights now. [1] w3c/input-events#22 w3c/input-events#135 https://www.w3.org/2022/09/15-editing-minutes.html#a01 |
https://wpt.fyi/results/input-events/input-events-typing.html?label=experimental&label=master&aligned&view=subtest should be updated to match the expected behaviour. https://wpt.fyi/results/input-events?label=experimental&label=master&aligned&view=subtest has additional tests. The composition events tests will require IME primitives. |
Score here is still 0% until we have some tests added / updated and progress on the spec changes. |
Quirks I have observed:
I've also made an input events tester like @whsieh, see here: https://azmisov.github.io/Input-Events-Tester/. Feel free to use/fork/edit if you want. It will pretty print the DOM HTML, along with target ranges/selection embedded, and a unique id applied to each node. Can be helpful to test how browsers behave with things other than plain text (which I would say is the motivation behind InputEvents). Can be used cleanly from mobile browsers as well. |
I agree. I recall testing Safari and it wouldn't fire historyRedo if there was nothing to redo, but I'd have to double check that. Developer may want to implement their own history, but they'd currently have to listen for key combos and sniff OS to do so (and I suppose mobile platforms may not emit a key combination and so impossible to integrate with any builtin undo/redo). |
Although we've got some useful feedback here, it seems like there hasn't been any concrete progress writing tests or resolving interop differences. So I think the score is still 0%. |
Hey @Azmisov , I am using this page where I am trying to reproduce your findings: https://domeventviewer.com/key-event-viewer-ce.html as well as your own input tester.
I am not able to reproduce that. If there is no content after the caret, I receive a
Reproduceable. Added to test.
I'm not able to reproduce that. I see before/input events of type I am not able to test the Safari-related events for now. |
I'll go back and test it again tomorrow, or this weekend if I don't get to it |
For the first one: select 1+ characters first, then press delete. The second |
One area that's believed to cause significant compat problems and difficulties for writing reliable editors is differences between input events, and their order, in different browsers. As part of this investigation we should:
The aim is that the identified tests would be a candidate for an Interop 2023 focus area that browsers would be able to commit to.
The text was updated successfully, but these errors were encountered: