NEW 266250
Custom Highlights API painting does not invalidate properly when removing highlights
https://bugs.webkit.org/show_bug.cgi?id=266250
Summary Custom Highlights API painting does not invalidate properly when removing hig...
manuelroth
Reported 2023-12-11 13:26:48 PST
Created attachment 468987 [details] Bug with custom highlights api ## Steps to reproduce: - Open codepen on Safari on macOS 14.2: https://codepen.io/jensimmons/pen/vYbvrjq - Enter the word "features" into the text field - Make sure the word was entered character by character (not by copy pasting the entire word) - Observe how single "f" characters are highlighted instead of only the word "feature" - Other words ## Expected result: Only the word "features" is highlighted ## Actual result: Many single characters "f" in addition to the word "features" is highlighted This behaviour can also be reproduced with other words such as constantly, twice, typical. This issue can only be reproduced on desktop Safari and not on iOS
Attachments
Bug with custom highlights api (239.00 KB, image/png)
2023-12-11 13:26 PST, manuelroth
no flags
Screenshot of bug reproduced on iOS 17.2 (428.29 KB, image/png)
2023-12-11 14:03 PST, manuelroth
no flags
manuelroth
Comment 1 2023-12-11 14:02:39 PST
I first stated that this issue can only be reproduced on Safari on macOS. This is not true. I am also able to reproduce the is issue on iOS 17.2
manuelroth
Comment 2 2023-12-11 14:03:27 PST
Created attachment 468989 [details] Screenshot of bug reproduced on iOS 17.2
Abrar Rahman Protyasha
Comment 3 2023-12-11 14:18:38 PST
Thanks for the bug report! Yes, I would be surprised if it could only be reproduced on MacOS.
Tim Nguyen (:ntim)
Comment 4 2023-12-11 19:48:25 PST
I can reproduce this. We don't invalidate properly the painting in this case. Seems like a bug.
Radar WebKit Bug Importer
Comment 5 2023-12-11 19:48:35 PST
Tim Nguyen (:ntim)
Comment 6 2023-12-11 19:50:17 PST
I think this is a painting invalidation bug, because selecting the paragraph (which triggers a repaint), will fix this issue.
Note You need to log in before you can comment on or make changes to this bug.