ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Parent is null error when using Backspace/Del on changed font

Open dustinormond opened this issue 5 years ago • 1 comments

📝 Reproduction steps

  1. Build editor from source with both the classic and decoupled editor with the font plugin (i.e. npm install --save @ckeditor/ckeditor5-font)
  2. Change the font (i.e. font color, font background, font size, font type) of a word or words in ckeditor
  3. Backspace or delete one letter in the word(s) with the changed font
  4. Backspace or delete another letter

UPDATE: This error occurs also when I use the default decoupled editor with only adding the font plugin. Something is messed up with the font plugin when deleting twice.

✔️ Expected result

The expected result is that it will just continue deleting the text rather than throwing the below error.

❌ Actual result

The word(s) with the font that isn't default (i.e. font color, font background, font size, font type) are removed and the editor no longer works as expected. Here is the error. Uncaught TypeError: Cannot read property 'parent' of null at er._updateDomSelection (renderer.js:763) at er._updateSelection (renderer.js:697) at er.render (renderer.js:234) at bs._render (view.js:691) at bs. (view.js:198) at bs.fire (emittermixin.js:221) at bs.change (view.js:488) at bs._disableRendering (view.js:678) at Dl.listenTo.priority (editingcontroller.js:86) at Dl.fire (emittermixin.js:221)

📃 Other details

  • Browser: Edge (Chromium Version)
  • OS: Windows 10
  • First affected CKEditor version: Using the latest version, not sure about earlier versions.
  • Installed CKEditor plugins: font

dustinormond avatar Jan 15 '21 18:01 dustinormond

Disregard this. The issue is with other code I have that is getting in the way of ckeditor.

dustinormond avatar Jan 15 '21 19:01 dustinormond