Open santhoshtr opened 10 years ago
Reproduces in vanilla CodeMirror too
It seems bracket is placing the cursor based on the character count. The word സന്തോഷ് has 7 unicode characters. But the visual width is not 7 X character width. For complex scripts, the characters combine and form ligatures. Browsers can do this natively, overriding it using user level logic is bad idea.
Doesn't seem to repro in CM in FF, so this might be a Chrome-only CM issue.
To me to file against CM
What is CM?
@santhoshtr CM is referring to CodeMirror, the code-editor UI widget that Brackets uses.
Ok, reported there https://github.com/marijnh/CodeMirror/issues/2115
FYI, it looks from the CM bug thread like Marijn has been trying to fix this, but is hampered by lack of a good way to detect grapheme clusters from JS. Maybe someone from Web Platform has some knowledge in this area?
Paste the following text to brackets, and see where the cursor is placed
സന്തോഷ്
Cursor is supposed to place at end of the word, but in brackets it is after 4 or 5 character width.
Happens with all non-latin complex scripts