-
Notifications
You must be signed in to change notification settings - Fork 39
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
set targetRange to null for all editTypes where the targetRange would always have been equal to the selection range #80
Comments
I don't think the request was removing |
@rniwa Exactly. And I assume that this also applies to any future |
@rniwa How will this work with multi-range selections and inserting characters? Should the JS get an indication which of the ranges corresponds to the one where something will be inserted? Or is this up to the JS code to figure out? |
I think it depends on each editor and the type of an event you're getting. e.g. if the type is Regardless, |
agreed. For now I will just turn it into "targetRanges" for just that one editType. Then we can change it once you have the new selection object ready. |
And yes, all these events need to fire synchronously. |
@rniwa I think this already specifies the event order and that these events need to be synchronous: https://w3c.github.io/uievents/#h-event-types-list given that the "beforeInput" event there is the event we are working on (we should resolve #87 to be clear about this). |
@rniwa @kojiishi: At the CSSWG @frivoal and I discussed whether it would be good enough that it is specifies the order of the different events related to user input within cE are synchronous, if we want to make sure that the selection/caret has not changed at the time the event is being triggered, and also to be able to do the timeout-0 type polyfills @rniwa was contemplating. The synchronous nature of the events mean that one of them has to finish before the next one starts, right? Does it also ensure that there cannot be a separate thread that changes the selection in the meantime? |
Yes, there is no such a thing as a "separate" thread in Web. Everything is single threaded by design in DOM. |
This request came from Apple after the meeting had concluded. As I see it, this removes no functionality to editors, as one can simply find the range by looking at the selection, as long as everything is synchronous and the selection doesn't change before the event is being handled. So if this makes things easier for Webkit, I am fine with removing those target ranges.
Please comment if anyone has issues with this.
The text was updated successfully, but these errors were encountered: