1ec5 / avim

Vietnamese input method extension (IME) for Firefox, Thunderbird, SeaMonkey, Komodo, etc. — bộ gõ tiếng Việt dành cho Firefox, Thunderbird, SeaMonkey, Komodo, …
http://avim.1ec5.org/
MIT License
46 stars 4 forks source link

Diacritics disappear in CodeMirror on GitHub #181

Open 1ec5 opened 7 years ago

1ec5 commented 7 years ago

In CodeMirror text areas, any diacritics added by AVIM disappear as soon as the user adds another diacritic.

Among the places CodeMirror is used are GitHub and soon Wikimedia’s MediaWiki installations. Supporting Vietnamese text input while editing Wikipedia is a critical priority for AVIM.

(Per #135, AVIM used to work in CodeMirror by default, but something changed with that library in the last year or so, breaking AVIM.)

1ec5 commented 7 years ago

Actually, most of the demos at the CodeMirror site work fine. I’ve observed this issue at GitHub; it might be due to one of the addons GitHub installs. This is still important to investigate, because it’s likely that MediaWiki will be using many of the same addons.

1ec5 commented 7 years ago

GitHub installs the following addons:

[
  'codemirror/addon/comment/comment',
  'codemirror/mode/meta',
  'codemirror/addon/mode/simple',
  'codemirror/addon/mode/overlay',
  'codemirror/addon/mode/multiplex',
  'codemirror/addon/dialog/dialog',
  'codemirror/addon/search/search',
  'codemirror/addon/search/searchcursor',
  'codemirror/addon/search/jump-to-line',
  'codemirror-contrib/lib/mode/meta'
]
1ec5 commented 7 years ago

Confirmed that diacritics are preserved on the version of CodeMirror being deployed at Test Wikipedia. However, the dead key for removing diacritics (e.g., - in VIQR) doesn’t work after placing the insertion point at the end of a line.

1ec5 commented 6 years ago

Confirmed that diacritics are preserved on the version of CodeMirror being deployed at Test Wikipedia.

AVIM works with the CodeEditor extension and with VisualEditor – including when displaying syntax-highlighted code in VisualEditor. However, AVIM doesn’t work with CodeMirror when embedded inside the older wikitext editor. AVIM suffers from the same issue that plagues jQuery.ime.