Re: [editing] ContentEditable with UserSelect=None needs to be documented (#20)

> 2ii. No default behavior defined, JS handles them all.

Do you mean that by default the caret does not move at all (unless some JS code is defined to make it move), or that by default, the caret does whatever the caret would do on that particular platform?

>  I just wanted to tell you that, if we were going to 1. or 2.i., I wish the spec clarifies what UA should implement clearly.

@kojiishi: Ok, understood. For me, the most important part is that the movement can be overridden by JavaScript and that we have all the needed primitives to also do so, also in block direction. So if option 1 means that we can only change the caret position after it has been moved by the UA, I would prefer 2i or 2ii. 

Preferably, I think we should follow the ideas laid out in the Extensible Web Manifesto, not have the caret move at all by default and instead give JS developers access to all the primitives to do caret movement themselves in the contentEditable=typing spec. Then JS developers can try that out and hopefully create a library or two for that and then eventually create another spec for contentEditable=caret-movement or some such thing in the future based on their experiences with the library. Or they may decide that creating another spec is not needed as it turned out that every editor wants to do caret movement differently due to different requirements and that it wouldn't make sense to make it behave all the same.

However, as I understand @rniwa, he believes it is a requirement that the caret movemes by default and he wants that movement to be the default behavior of the OS/UA that the user is on. So I suggest we make a compromise so that:

* Carets move according to whatever schemes are common on their UA/OS.
* All caret movements are defined as defaults for beforeInput events, so that doing preventDefault() on a beforeInput event related to caret movement will let the JS override the default behavior entirely.
* All primitives needed to do caret movement in JS in all direction (inline as well as block) are offered through one of the spec. The most important being the actual placement of the caret. 

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/20#issuecomment-110649789

Received on Wednesday, 10 June 2015 08:29:25 UTC