https://bugzilla.wikimedia.org/show_bug.cgi?id=47772

--- Comment #2 from Bartosz DziewoƄski <[email protected]> ---
This seems to work:

>>> range = document.getSelection().getRangeAt(0)
Range 
>>> span = document.createElement('span')
<span/>
>>> range.getClientRects()
ClientRectList []
>>> range.surroundContents(span)
undefined
>>> $(span).offset()
{ left: 352, top: 1025 }

Now we just have to substract window.scrollY from the 'top' value and remove
the <span> from the DOM again. (And don't call .getClientRects() on that Range
again, as it returns a completely bonkers huge list of values.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to