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

> Ok, but can we go ahead and add something like `Document.caretPositionFromPoint()`

It's already in [CSS OM](http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface), what do you need to add?

Though, I think, unlike `elementFromPoint()` which looks similar, `caretPositionFromPoint()` needs to know how to resolve ambiguous caret position, so I think it should belong to the selection spec. If this looks reasonable, can someone talk to CSS WG to see what they think?

> and Document.getCaretPosition() to the spec, or do we have alternative proposals that will allow us to do the same thing?

Isn't it a one-liner:
```
window.getSelection().getRangeAt(0).getBoundingClientRect()
```
or are you talking about something different?

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

Received on Tuesday, 2 June 2015 02:14:05 UTC