w3c / input-events

Input Events
https://w3c.github.io/input-events/
Other
24 stars 16 forks source link

Definitions for 'Update the DOM'/'Update the DOM element' #144

Closed dandclark closed 1 year ago

dandclark commented 1 year ago

In the beforeinput section, the following behavior is given for the default action:

Varies: 'Update the DOM' for contentEditable=typing editing hosts for inputTypes "insertCompositionText" and "deleteCompositionText". 'Update the DOM element' for contentEditable="true" editing hosts for all inputTypes. None otherwise.

'Update the DOM' and 'Update the DOM element' are wrapped in quotes in a way that suggests these are algorithms defined somewhere, but I can't find any such definitions. It's also not clear if there is supposed to be a difference between 'Update the DOM' and 'Update the DOM element'.

@johanneswilm maybe you know if there's supposed to be a difference between these, or whether they're supposed to be defined somewhere?

johanneswilm commented 1 year ago

@dandclark I believe the quotation marks are just there to make the sentence more easily understood. I am not sure if there is a difference in meaning between the two, but given that contentEditable=typing never was implemented and only partially specified, it shouldn't make a difference.

At the time there was consensus that we should not specify how the DOM would change - or in which it would not be updated at all (for example when hitting backspace at the beginning of a contenteditable area, etc.). This will differ between implementations. I don't think it is specified more than that. Maybe there will be a definition in the contenteditable spec eventually, but unless it's very important for EditContext, I would not spend too much time on it.

dandclark commented 1 year ago

That makes sense, thank you!