Bug 240277 - Highlighting Sliding Issue With Arabic in Safari
Summary: Highlighting Sliding Issue With Arabic in Safari
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: All All
: P1 Critical
Assignee: Nobody
URL: https://muqattacounter.github.io/#sur...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-10 07:17 PDT by Abdurrahman Ayyıldız
Modified: 2022-06-26 15:07 PDT (History)
6 users (show)

See Also:


Attachments
Safari has renders JavaScript differently so that unified letter لا which consists from two letters ل+ا highlighted twice in ل at true position ا at next character's position(false) (8.31 KB, image/png)
2022-05-10 07:17 PDT, Abdurrahman Ayyıldız
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Abdurrahman Ayyıldız 2022-05-10 07:17:07 PDT
Created attachment 459117 [details]
Safari has renders JavaScript differently so that unified letter لا which consists from two letters ل+ا highlighted twice in ل at true position ا  at next character's position(false)

Selam, thanks to this extension( https://github.com/lonekorean/highlight-within-textarea ) it was really helpful for my project: https://muqattacounter.github.io but I have issues with Safari...

It has renders JavaScript differently so that unified letter لا (LamElif) which consists from two letters ل+ا (Lam + Elif) highlighted twice in ل at true position and ا at next character's position(false):

https://i.stack.imgur.com/x44TN.png

Because of this sliding issue all the next highlights becomes increasingly more false(more slided) as new لا unified letters comes in at next characters... And end result is this:

https://i.stack.imgur.com/itwMD.jpg

Firefox can separately highlight this two letters from middle(**which is desired**):

https://i.stack.imgur.com/4OFIZ.png

Can you render js files like Firefox about this issue?
Comment 1 Abdurrahman Ayyıldız 2022-05-10 07:36:10 PDT
For seeing issue at first hand look for example here: https://muqattacounter.github.io/#sura=4&verse=87&count=ا+ل
Comment 2 Alexey Proskuryakov 2022-05-10 09:21:28 PDT
I can select half of the character interactively, so WebKit has the correct text iterator for the selection. The extension must be using some JS API whose behavior is different.
Comment 3 Abdurrahman Ayyıldız 2022-05-10 09:50:56 PDT
It uses JQuery but it has nothing to do about JQuery or code whatever it uses..

Because it is the same code for all browsers and all(chrome/firefox/safari) 3 of them gives different results in this link:

https://muqattacounter.github.io/#sura=4&verse=87&count=ا+ل

Best result is firefox's and then chrome's and worse is safari's... that's it!
Comment 4 Radar WebKit Bug Importer 2022-05-17 07:18:13 PDT
<rdar://problem/93422301>
Comment 5 Abdurrahman Ayyıldız 2022-05-19 07:49:45 PDT
This issue is not about rendering JavaScript wrongly, it is about rendering display property of CSS wrongly...
Comment 6 Abdurrahman Ayyıldız 2022-06-23 16:14:33 PDT
The issue is specifically about webkit/safari interpretation of display:inline; property of CSS
Comment 7 Abdurrahman Ayyıldız 2022-06-26 15:07:54 PDT
Issue comparison for major browsers: https://muqattacounter.github.io/pic/browsers.png

Other browsers than firefox renders "display: inline" property of CSS wrong so letter "ﻻ" higlighted wrong by other browsers!