ckeditor5
ckeditor5 copied to clipboard
Creating a codeblock via backticks on some keyboard layouts causes TypeError: Cannot read properties of null (reading 'parent')
📝 Provide detailed reproduction steps (if any)
- On Windows, set up the US International keyboard layout (not the standard US one).
- Go to https://ckeditor.com/ckeditor-5/demo/feature-rich/
- Type three backticks to open a code block (```).
- Observe the logs for an error.
✔️ Expected result
Inserting the code block via the auto-formatting should not cause any exceptions.
❌ Actual result
An unexpected error is triggered:
ck-demo-external-fea…293eec72de.js:15999
Uncaught CKEditorError: unexpected-error
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-unexpected-error
Original error: TypeError: Cannot read properties of null (reading 'parent')
at hg.findMappedViewAncestor (ck-demo-external-fea…72de.js:16002:27714)
at hg.<anonymous> (ck-demo-external-fea…72de.js:16055:41843)
at hg.fire (ck-demo-external-fea…c72de.js:16000:1669)
at hg.toModelPosition (ck-demo-external-fea…72de.js:16002:27163)
at hg.toModelRange (ck-demo-external-fea…72de.js:16002:26957)
at ck-demo-external-fea…2de.js:16020:104647
at Array.map (<anonymous>)
at Object.<anonymous> (ck-demo-external-fea…2de.js:16020:104638)
at Object.fire (ck-demo-external-fea…c72de.js:16000:1669)
at So (ck-demo-external-fea…72de.js:16000:80780)
📃 Other details
- Browser: Edge
- OS: Windows 11
- First affected CKEditor version: 46.0.0
- Installed CKEditor plugins: Happens in vanilla too.
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Please ckeditor folks, have a look at this bug. Ckeditor eating my data is one of those scenarios that makes mad. Happens when the backticks are typed fast.
cc. @Witoso
Let us know if additional information is needed.