Comments (9)
What do you mean by "each event" in this case? Do you mean to say you want the contents of the note referenced above, but in a more technical language? Or is it something completely different?
We need to specify the ordering of each event, and what happens when each one of the event is canceled, or DOM is mutated, etc...
Gary has been starting a new spec on event order: https://github.com/garykac/event-order/blob/master/index.bs because ui events is too full.
That's good. We really need to spec the precise event ordering there.
@annevk : I guess this is what you want re: processing model.
from input-events.
- @rniwa @choniong @hober @ojanvafai
from input-events.
@whsieh AFAIK, the composition will go ahead as planned, no matter whether or not deleteByComposition is being preventDefaulted. The first step of that is a noncancelable insertCompositionText which inserts the entire composition string into the DOM (in case of recomposition).
In the case of a recomposition, this means that if the JS preventDefaults the very first deleteByComposition, and then doesn't remove what is to become the composition string from the DOM itself, the contents of the composition string will be seen twice: once as it was before, and a second time in the composition string.
I've tried to summarize the procedure in this note: https://w3c.github.io/input-events/#h-note4 . We should probably additionally have some examples.
from input-events.
Note is non-normative, this really needs to be spec'ed in normative text somewhere.
from input-events.
Note is non-normative, this really needs to be spec'ed in normative text somewhere.
Yes, it is. I primarily added it as a help for JS developers who will try to use these events to create editors based on the beforeinput event. It is marked as non-normative, as it's not meant to define new behavior for browser implementers.
Is the note's content the same content you would like to see as normative text for implementers?
from input-events.
The current node you linked isn't precise enough as normative text. We need to spec precisely what happens for each event but that the normative text probably needs to be in ui events instead.
from input-events.
We need to spec precisely what happens for each event
What do you mean by "each event" in this case? Do you mean to say you want the contents of the note referenced above, but in a more technical language? Or is it something completely different?
Gary has been starting a new spec on event order: https://github.com/garykac/event-order/blob/master/index.bs because ui events is too full.
from input-events.
Not sure, it's not so much about order (although that's obviously a part of it), it's mostly how they influence each other, get their state, perform actions (such as drag-and-drop), etc.
from input-events.
In short preventing 'deleteByComposition'
should behave similar to collapse selection forward and start composition (but will probably pre-insert some marked text).
@rniwa Yes I agree that we need some precise definition for each inputType
. But before that happens #34 (comment) is the original proposal for IME related Default Action
and Event Order
, hope that helps.
from input-events.
Related Issues (20)
- Define "affected ranges" clearer at `InputEvent.getTargetRanges()` definition HOT 13
- Define result of `getTargetRanges()` of `input`
- Define what should return `getTargetRanges()` of `beforeinput` after propagation
- Make "Input Events Level 1" declare "beforeinput cancelable" of "insertCompositionText" as "Undefined" HOT 27
- [feature request] Standardize long press touch event HOT 1
- InputType to insert image from software keyboard HOT 9
- Encourage browsers to include files in `beforeinput` DataTransfer event HOT 2
- Request: a way to get and react to target ranges for all changes HOT 6
- Add spec-prod GitHub Actions HOT 4
- Bug on Android Web. Input Value duplicates when typing too fast between input fields.
- Use new `[=xref=]` syntax for DND terms HOT 1
- Move to Jitsi for meetings? HOT 1
- inputType not specified for the input type="number" 'step up/down' event
- Gather informations on content replaced by insertReplacementText or trigger a deleteByReplacement event?
- Should the last beforeinput to occur before compositionend be cancellable? HOT 11
- Order and cancelation behavior of events in composition disagrees with UI Events
- InputEvent fired twice when inserted emoji HOT 5
- What is the intended/recommended approach to hijack composition events? HOT 2
- inputType on safari mobile is undefined HOT 2
- Proposal: better encapsulation of composition events HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from input-events.