IME: errors when typing in Burmese language on Windows
π Provide detailed reproduction steps (if any)
- Use Windows machine
- Open editor demo
- Change language to
Myanmar (Visual Order) - Type the following sequence:
tm;vHk;yJ tqifayjujygap>
βοΈ Expected result
You are able to type the full sequence. Text composes properly- α‘α¬αΈαα―αΆαΈαα² α‘αααΊβααΌα±ααΌαα«α
α±α
β Actual result
Not able to finish typing, composition stops just before few last characters. If you then put cursor after this text and start typing, errors are thrown:
Uncaught CKEditorError: model-nodelist-offset-out-of-bounds {"offset":23,"nodeList":[{"data":"α‘α¬αΈαα―αΆαΈαα² α‘αααΊααΌα±ααΌαα«"}]}
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-model-nodelist-offset-out-of-bounds
at va.offsetToIndex (ck-demo-external-feature-rich-e4b9a235dc.js:2:654301)
at _a.offsetToIndex (ck-demo-external-feature-rich-e4b9a235dc.js:2:657026)
at Da (ck-demo-external-feature-rich-e4b9a235dc.js:2:667738)
at get textNode [as textNode] (ck-demo-external-feature-rich-e4b9a235dc.js:2:662150)
at Ac (ck-demo-external-feature-rich-e4b9a235dc.js:2:799762)
at vc._validateSelectionRange (ck-demo-external-feature-rich-e4b9a235dc.js:2:799598)
at qa._validateSelectionRanges (ck-demo-external-feature-rich-e4b9a235dc.js:2:697698)
at qa._replaceAllRanges (ck-demo-external-feature-rich-e4b9a235dc.js:2:697477)
at qa._setRanges (ck-demo-external-feature-rich-e4b9a235dc.js:2:688630)
at qa.setTo (ck-demo-external-feature-rich-e4b9a235dc.js:2:687738)
Uncaught CKEditorError: insert-operation-position-invalid
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-insert-operation-position-invalid
at ql._validate (ck-demo-external-feature-rich-e4b9a235dc.js:2:748272)
at Oc.on.priority (ck-demo-external-feature-rich-e4b9a235dc.js:2:824101)
at Oc.fire (ck-demo-external-feature-rich-e4b9a235dc.js:2:476345)
at <computed> [as applyOperation] (ck-demo-external-feature-rich-e4b9a235dc.js:2:480064)
at Ec.insert (ck-demo-external-feature-rich-e4b9a235dc.js:2:805599)
at Pc._insertPartialFragment (ck-demo-external-feature-rich-e4b9a235dc.js:2:818131)
at Pc.handleNodes (ck-demo-external-feature-rich-e4b9a235dc.js:2:816742)
at ck-demo-external-feature-rich-e4b9a235dc.js:2:826202
at Oc.change (ck-demo-external-feature-rich-e4b9a235dc.js:2:828385)
at Oc.<anonymous> (ck-demo-external-feature-rich-e4b9a235dc.js:2:825529)
Uncaught CKEditorError: model-nodelist-offset-out-of-bounds {"offset":24,"nodeList":[{"data":"α‘α¬αΈαα―αΆαΈαα² α‘αααΊααΌα±ααΌαα«"}]}
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-model-nodelist-offset-out-of-bounds
at va.offsetToIndex (ck-demo-external-feature-rich-e4b9a235dc.js:2:654301)
at _a.offsetToIndex (ck-demo-external-feature-rich-e4b9a235dc.js:2:657026)
at Da (ck-demo-external-feature-rich-e4b9a235dc.js:2:667738)
at get textNode [as textNode] (ck-demo-external-feature-rich-e4b9a235dc.js:2:662150)
at Ac (ck-demo-external-feature-rich-e4b9a235dc.js:2:799762)
at vc._validateSelectionRange (ck-demo-external-feature-rich-e4b9a235dc.js:2:799598)
at qa._validateSelectionRanges (ck-demo-external-feature-rich-e4b9a235dc.js:2:697698)
at qa._replaceAllRanges (ck-demo-external-feature-rich-e4b9a235dc.js:2:697477)
at qa._setRanges (ck-demo-external-feature-rich-e4b9a235dc.js:2:688630)
at qa.setTo (ck-demo-external-feature-rich-e4b9a235dc.js:2:687738)
β Possible solution
If you have ideas, you can list them here. Otherwise, you can delete this section.
π Other details
- Browser: β¦
- OS: β¦
- First affected CKEditor version: β¦
- Installed CKEditor plugins: β¦
If you'd like to see this fixed sooner, add a π reaction to this post.
@FilipTokarski could you check how it behaves on MacOS?
macOs Chrome:
macOs Firefox:
Composition finishes properly. However, the first part has a bit different characters.
Wanted to add two additional key sequences that we've heard cause issues with CKEditor + Windows to provide more reproduction steps.
- Typing
awmhshould produceαα±α¬α· - Typing
taumifhshould produceα‘αα±α¬αα·αΊ
@FilipTokarski could you check the behavior of those short sequences on Windows again?
Chceked on latest (41.0.0) docs and I'm not able to reproduce the error.
@FilipTokarski does it result in the exact values?
- Typing
awmhshould produceαα±α¬α·- Typing
taumifhshould produceα‘αα±α¬αα·αΊ
Yes, those were working ok for me as well.
Based on the above @slotterbackW any chance you could organize tests with your power users on the testing of native Windows IME? It's much easier to debug this one for us than the KeyMagic one.
Yep I asked them yesterday! They came back and said
Firstly we attempted to enter α α±α by typing ap>. It worked perfectly. We then tried to enter αα«α α±α by typing ygap>, and we managed to reproduce the issue. We could see that after typing ygap, the blinking cursor disappeared as CKEditor had lost focus. At this point of time, typing > resulted nothing to the editor. When I pressed the space bar, the scrollbar immediately jumped to the end of the page. I had to click into the editor again to resume typing. I could see that the underline did not go away after typing >
Just restating, sounds like typing ygap using the Myanmar (Visual Order) keyboard on Windows caused the editor to lose focus once the p was typed. This was after typing another set of characters so not sure if that's a factor or not.
typing ygap using the Myanmar (Visual Order) keyboard on Windows caused the editor to lose focus once the p was typed
Yes, I can reproduce this behaviour. It manifests in two ways:
- If you type
ygapin the empty editor or what you type is the last line in the editor - the editor wil lose focus - If you type
ygapbetween content/paragraphs - selection will jump to the next line
Oh, actually if you type ygap in the empty editor and then when you focus the editor again (just click in the editing area), you get the error that was reported in the initial message:
Uncaught CKEditorError: model-nodelist-offset-out-of-bounds
So unfortunately it's still there.
We were researching this issue. The problem is that for this language, the browser is not firing the compositionend event after typing ygap, instead it moves the selection forward, in most cases by 2 characters. If the typed phrase is at the end of the editor, then the selection jumps to the nearest text node after the editor. While typing inside some text, the selection jumps 2 characters forward. The same behavior can be reproduced in the plain content-editable element so this is a browser bug.
Since the compositionend event was not fired, the model is not updated and there is a misalignment between the DOM and model/view, and position mapping fails (the reported model-nodelist-offset-out-of-bounds error).
While debugging it we were looking for a workaround. This is a tricky case because without the compositionend event, we do not have the data to insert into the model (we do not use beforeinput insertCompositionText on desktop). We could try to monitor the document selection and try to "break" the composition if detected selection outside the composed range, but this is tricky since the composition does not provide API to stop it.
Since the above happens only in Chrome on Windows I'd like to check if implementing the EditContext could help resolving this issue.
@niegowski can we report this issue to the Chromium with the reproduction steps?
@niegowski can we report this issue to the Chromium with the reproduction steps?
Reported to Chromium: https://issues.chromium.org/issues/344767735
@slotterbackW we will push it through Chromium support, it's possible that this also affects this KeyMagic bug (#14117), but I'm not sure. It's weird that both are related to Chrome + Windows.