Re: [w3c/editing] Should execCommand dispatch beforeinput or not? (#200)

> What you seem to be asking for is a way for a JS app to generate input events which are *indistinguishable* from real input events issued by the user. 
 
@tszynalski I am not asking for anything. I would like for `execCommand to just disappear altogether. I am here trying to find a solution for those of you who do still use `execCommand` for something. How about the suggestion made above by @rniwa to use `isTrusted` or alternatively another property to make this differentiation in those cases where you really need it? The prefix solution suggested by @masayuki-nakano has that shortcoming that it will then only work for those editors that had `execCommand` in mind when they build their editor. In many cases, that will not happen, because the editors themselves don't use `execCommand` and so it's only if the user combines the editor with a special browser plugin that does use `execCommand` that this will be relevant.

> [Above](https://github.com/w3c/editing/issues/200#issuecomment-558949339), I have described an example where it's important to distinguish between user-issued and app-issued `beforeinput` events. You can bet there are many more cases like that.

I am not really sure I agree with the need for the distinction  in that example: what if the user has a physical keyboard with both a dash and an endash - then you'd surely also want to turn that feature of yours off as well for the regular dash, right? But yes, I can theoretically see that there might be cases where this it makes a difference. I am not sure is important enough to add an entirely new property. 


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/200#issuecomment-574637590

Received on Wednesday, 15 January 2020 12:25:55 UTC