Open rniwa opened 9 years ago
it works on Firefox, (range.getBoundingClientRect) and should work soon on chrome when they fix it for collapsed ranges
Isn't CaretPosition.getClientRect() in [1] enough?
BTW, Is bounding box enough for application? It is better to return DOMQuad[2] in CSSOM View API, then we author use DOMQuad.bounds if they want to use bounding rectangle.
[1] https://drafts.csswg.org/cssom-view/ [2] https://www.w3.org/TR/geometry-1/#DOMQuad
No, CaretPosition.getClientRect()
would return one rect but caret could appear at two different locations simultaneously in some browsers.
Yes, or the other way round, at least that's how it currently is. On 16 Mar 2016 12:33 p.m., "Ryosuke Niwa" notifications@github.com wrote:
No, CaretPosition.getClientRect() would return one rect but caret could appear at two different locations simultaneously in some browsers.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/w3c/selection-api/issues/58#issuecomment-197385383
We need an API to return one, or two in the case of bidi, rects for the current caret position.