NEW 20957
offsetLeft is wrong for span-tags in some conditions
https://bugs.webkit.org/show_bug.cgi?id=20957
Summary offsetLeft is wrong for span-tags in some conditions
Arne
Reported 2008-09-20 04:39:03 PDT
A span-tag at the end of a paragraph, e.g: <p>Text <span></span></p> Does not have a proper offsetLeft when there is a whitespace between the text and span-tag.
Attachments
Testcase (676 bytes, text/html)
2008-09-20 04:41 PDT, Arne
no flags
Safari 15.6 differs from other browsers (616.87 KB, image/png)
2022-08-03 04:28 PDT, Ahmad Saleem
no flags
Arne
Comment 1 2008-09-20 04:41:21 PDT
Created attachment 23600 [details] Testcase A testcase for this, that will print an error if a strange wrong offsetLeft is received. It passes on FireFox/3.0.1.
Ahmad Saleem
Comment 2 2022-08-03 04:28:21 PDT
Created attachment 461375 [details] Safari 15.6 differs from other browsers I am able to reproduce this bug based on attached test case and Safari show extra line (Expected offsetLeft for empty span-tag...), which is not present in other browsers as can be seen from attached screenshot. I am changing "bug" status to NEW. Thanks!
Radar WebKit Bug Importer
Comment 3 2022-08-03 13:03:05 PDT
zalan
Comment 5 2023-06-14 09:28:37 PDT
This is about WebKit's useTrailingWhitespaceMeasuringOptimization (see TextUtil::width)
Note You need to log in before you can comment on or make changes to this bug.