Topic on Extension talk:CodeMirror

Jump to navigation Jump to search

Backspace deletes too much and Undo action is disabled

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. (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 (,, 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"