Re: [editing] What browser internals can be exposed to help us move the caret in (and against) the block direction? (#56)

There are several use-cases for this new API:
1. Implement the caret in script.
 - Not the goal of this spec.
2. Reuse UA selection changing mechanisms. 
 - No API needed.
3. Reuse just the UA caret rendering: 
 - Need API to specify where exactly the caret is rendered at line wraps. `document.getSelection().getRangeAt(0).getClientRects()[0]` fails in this case.
 - Box Tree API would be great, but there are (tremendously hacky) workarounds even now.
4. Reuse UA selection changing mechanisms also, but avoid placing caret in some of the positions.
 - Cannot use the Selection API because it does not play nice with UA selection mechanisms, e.g. resets the magic X coordinate in UP/DOWN caret movement. 
 - An idea would be to have some way to specify which caret positions the user is allowed to place the caret at (CSS property, HTML attribute, etc.). This does not affect the specification of the Legal Caret Positions. WDYT?

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

Received on Saturday, 30 May 2015 07:46:21 UTC