-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bracket matching decoration extends over composition in Safari #1324
Comments
I could reproduce this on Firefox and Chrome as well. Attached patch adds a kludge to work around it. |
…s before FIX: When starting a composition after a non-inclusive mark decoration, temporarily insert a widget that prevents the composed text from inheriting that mark's styles. Issue codemirror/dev#1324
Unfortunately I think this may have created a few different issues (or perhaps they were there before, but I hadn't noticed them). Both of these are using the French keyboard layout on macOS to type "è", using the "grave accent" key next to Enter. https://codemirror.net/try/?c=VGhpcyBpcyBhICh0ZXN0KQ== In Chrome, an extra accent character is inserted and the main character gets the matched bracket highlighting: chrome.movchrome-start.movIn Safari, the correct character is inserted, but the syntax highlighting is odd while typing and the opening matched bracket decoration is missing afterwards: safari.mov |
FIX: Fix the editor getting stuck in composition when Safari fails to fire a compositionend event for a dead key composition. Issue codemirror/dev#1324
It seems like Safari is simply not firing |
[ignore my previous comment, deleted once I realised that the latest fix isn't on Try CodeMirror yet] I've tested the main branch and this does seem to be resolved in both Chrome and Safari - thanks! |
FIX: Remove the workaround that avoided inappropriate styling on composed text after a decoration again, since it breaks the stock Android virtual keyboard. Issue codemirror/dev#1358 Issue codemirror/dev#1324
Reverted this kludge. See #1358 for discussion. We may be able to avoid this issue by using |
Describe the issue
In Safari, when using a keyboard layout where some keys start a composition (e.g. those highlighted in orange below, in the macOS Keyboard Viewer), pressing one of those keys while the cursor is immediately after a matched bracket decoration causes the decoration to extend over the inserted text. The editor can continue to behave strangely after this point, until the page is reloaded.
composition-after-matched-bracket.mov
French:
Spanish:
This might seem like an obscure edge case, and it does only affect Safari users with certain keyboard layouts, but typing
^
after a closing bracket is quite common when writing equations in LaTeX!Browser and platform
macOS 14.1.2, Safari 17.1.2
This does not happen in Chrome or Firefox.
Reproduction link
https://codemirror.net/try/?c=VGhpcyBpcyBhICh0ZXN0KQ==
The text was updated successfully, but these errors were encountered: