Bug 138949
| Summary: | range.getBoundingClientRect() returns incorrect value for collapsed ranges | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Glen Huang <hey.hgl> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, enrica, rniwa |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Glen Huang
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Glen Huang
Blink has confirmed this bug.
https://code.google.com/p/chromium/issues/detail?id=435438
I believe this bug exists pre-fork.
Ahmad Saleem
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
*** This bug has been marked as a duplicate of bug 196380 ***