w3c / edit-context

EditContext API
https://w3c.github.io/edit-context/
Other
28 stars 7 forks source link

Spec clarifications for use with canvas vs "normal" DOM elements #86

Open dandclark opened 8 months ago

dandclark commented 8 months ago

The spec should be clearer about what the differences are for authors when they are using a <canvas> as the associated element vs a non-canvas element. E.g with <canvas> the browser's spellcheck cannot be used, and the user has to implement selection/caret navigation. This should be in the normative text, possibly under 1.2.3 ("Differences for an EditContext editing host.

Additionally, in the Input Events spec, the following change needs to be made: From: "getTargetRanges() returns an arrays StaticRanges representing the text that the event will modify if it is not canceled."

to something like:

"getTargetRanges() if the editing host is contenteditable node or an EditContext dom container node it returns an arrays StaticRanges representing the text that the event will modify if it is not canceled. Otherwise the method will return none. "