Topic on Extension talk:CodeMirror

Backspace deletes too much and Undo action is disabled

2
Palaestrator verborum (talkcontribs)

The thing that holds me off using the wikitext syntax highlighting is that it only deletes whole segments of writing when I use the backspace key, deviating from the standard behavior in Firefox. This means I cannot just delete the stress mark over the word “ворота́” without deleting the final vowel sign “а” too, and it inhibits me from proper vocalizing of Arabic text with ḥarakāt and vocalizing any other Semitic script, which is needed on Wiktionary. Presumably the problems with more complex scripts are much more severe. Similar to this problem is also that the extension disables the “Undo” function in the context menues the browser opens in text fields, which is also a reason not to use the extension.

197.218.92.213 (talkcontribs)

Browser based undo (on right click) will never work properly with tools like this unlike keyboard shortcuts ( Ctrl + Z) . Basically, due to how html is designed, syntax highlighting tools must essentially forcibly hack in the styling to show the "cute" colors.

Codemirror seems to use contenteditable which doesn't work properly for this kind of thing (https://github.com/codemirror/CodeMirror/commit/58a487174b23740e76f42f883530ed50abd4f019, https://github.com/w3c/editing/issues/150), and even Extension:CodeEditor which doesn't use contenteditable still doesn't work properly with the browser based undo. Attempting to synchronize the highlighting when content changes is a fragile and will always have a long list of bugs.

It is a tradeoff, either use hacky syntax-highlighting and lose out on certain features, or use the plain textarea and enjoy all browser based features, and whatever browser bugs it comes with.

Reply to "Backspace deletes too much and Undo action is disabled"