The highlighting is wrongly triggered while IME inputs are not committed, which is a normal situation for CJK inputs. The current version will give a result like this:
This PR maintains a new state inComposition in HighlightCodeBlockWidget by listening compositionstart and compositionend events, and ignores every changes fired between these events. The fix references facebook/react#3926 and ckeditor/ckeditor5#1342.
The highlighting is wrongly triggered while IME inputs are not committed, which is a normal situation for CJK inputs. The current version will give a result like this:
This PR maintains a new state
inComposition
inHighlightCodeBlockWidget
by listeningcompositionstart
andcompositionend
events, and ignores every changes fired between these events. The fix references facebook/react#3926 and ckeditor/ckeditor5#1342.