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

> if it is enabled it can easily lead to issues if a user then adds executes execCommand to the beforeinput event handler.

I'd rather have a consistency that `beforeinput` event is fired whenever `input` event is fired since `execCommand` does fire `input` event. We have this kind of mismatch for `selectstart` event and `selectionchange` event and it's quite a mess. Every inconsistency like this is an extra cognitive pressure every new Web developer has to endure, and we should avoid adding such a thing as much as possible.

We can make `event.isTrusted` to `false` or add a new boolean to `InputEvent` to make it obvious if there is a use case in which `beforeinput` fired for `execCommand` needs to be disambiguated against ones fired for user initiated editing operations.

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

Received on Monday, 2 September 2019 19:58:41 UTC