RESOLVED DUPLICATE of bug 196380138949
range.getBoundingClientRect() returns incorrect value for collapsed ranges
https://bugs.webkit.org/show_bug.cgi?id=138949
Summary range.getBoundingClientRect() returns incorrect value for collapsed ranges
Glen Huang
Reported 2014-11-20 20:51:33 PST
Example URL: http://jsbin.com/lesobugupi/2/edit?html,js,output Steps to reproduce the problem: 1. click on the hello text 2. see a 0 0 0 0 value in the output div What went wrong? range.getBoundingClientRect() should return a rect that denotes the range position even if it's collapsed, according to the spec http://www.w3.org/TR/cssom-view/#dom-range-getclientrects Especially the "including when the boundary-points are identical" part. Blink also has this problem. Works in gecko.
Attachments
Glen Huang
Comment 1 2014-12-20 02:49:54 PST
Blink has confirmed this bug. https://code.google.com/p/chromium/issues/detail?id=435438 I believe this bug exists pre-fork.
Ahmad Saleem
Comment 2 2022-09-17 03:48:06 PDT
I am not able to reproduce this with Safari Technology Preview 153 and it does not show "0 0 0 0" value. I will tag others to confirm whether it is fixed it or not. Thanks!
Alexey Proskuryakov
Comment 3 2022-09-18 17:04:42 PDT
*** This bug has been marked as a duplicate of bug 196380 ***
Note You need to log in before you can comment on or make changes to this bug.