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

@tszynalski Yes, so the editor itself should not use `execCommand` at all, and if it does, it would not be the kind of editor that uses `beforeinput` so that should not matter. The usecase of @scottfr though is that you have something external - likely a browser plugin that adds some functionality by pasting things in - and it currently only has `execCommand` for that. That seems it could also work for a solution similar to your own editor solution for users who lack just a few keys on their keyboard that they need for one specific language [1] if instead of doing the input in a special editor, you'd add those keys by means of a browser plugin so they work as sort of an additional soft keyboard. 

> Anyway, I'm not sure why you would bring up that argument, seeing as it applies only to a small percentage of users.

The point is it is a very special case and some users may actually not want the behavior you describe. Or they want it even if using their physical keyboard. So you'd need an on/off setting somewhere anyway. And so given that it is such a special case, it's not clear that it is worth the effort to add this to the spec and then program it for all the browsers.

Another approach we could take (that I'd also be OK with) is to do as @masayuki-nakano suggested and prefix all the beforeinput events related to `execCommand` or even remove them entirely. Then `execCommand` would not be useful for @scottfr and then we'd need to add a new way for JavaScript to execute all the actions corresponding to all the different input types and fire the chain fo events.

At the last call the solution was that I create a PR on the `execCommand` spec for the next call (in February). Given that I don't have a strong opinion on the exact solution other than that this needs to be resolved in a way that works for users, I am also happy to discuss alternative PRs that others present at next month's call.

[1] https://www.typeit.org/

-- 
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-574794092

Received on Wednesday, 15 January 2020 18:37:29 UTC