Ckeditor5: [Chrome, Edge] Exception after pressing CTRL + U while content is selected

Created on 13 Dec 2017  Β·  6Comments  Β·  Source: ckeditor/ckeditor5

🐞 Is this a bug report or feature request? (choose one)

  • Bug report

πŸ’» Version of CKEditor

1.0.0-alpha2

πŸ“‹ Steps to reproduce

Scenario 1

  1. Go to http://localhost:8125/ckeditor5-core/tests/manual/article.html.
  2. Select the image caption.
  3. Press Ctrl + U (it's still Ctrl in MacOS).

Scenario 2

  1. Go to http://localhost:8125/ckeditor5-core/tests/manual/article.html.
  2. Select two list items.
  3. Press Ctrl + U (it's still Ctrl in MacOS).

βœ… Expected result

Nothing happens.

❎ Actual result

There is the error in the console and in Chrome the selection has moved to the beginning of the document.

πŸ“ƒ Other details that might be useful

Error

input.js:205 Uncaught TypeError: modelFromCurrentDom.getChildren is not a function
    at MutationHandler._handleContainerChildrenMutations (input.js:205)
    at MutationHandler.handle (input.js:147)
    at Input._handleMutations (input.js:105)
    at Document.listenTo (input.js:50)
    at Document.fire (emittermixin.js:269)
    at MutationObserver._onMutations (mutationobserver.js:248)

GIF

bug_cke5

Notes

It doesn't occur if the underline plugin is loaded.

Other information

OS: Windows 10, MacOS X
Browser: Chrome, Edge

bug

Most helpful comment

I wonder what's up, cause I can't reproduce it, while @Mgsy says that it is fixed for caption but still crashes for list items.

EDIT: Okay, yeah, whatever, as usual it suddenly started to be broken for me aswell, but just after writing a comment.

All 6 comments

This is a good one. I guess that a native underline comes into action and breaks our mutation observer.

I wonder what's up, cause I can't reproduce it, while @Mgsy says that it is fixed for caption but still crashes for list items.

EDIT: Okay, yeah, whatever, as usual it suddenly started to be broken for me aswell, but just after writing a comment.

Although, when I click Cmd + U, I don't get an underline, instead I get this sign: Β¨ and composition starts (I guess) and this crashes when there is a multielement selection.

BTW, on my MacOS at least, with Polish Pro keyboard the keystroke which is worth testing is Alt+U.

Pressing Alt+U enters umlaut composition. So Alt+U,U inserts "ΓΌ". This works fine on Firefox and Chrome in some cases now, but crashes on the two-lists-item-selection. After #140 it simply stops crashing in the two-lists-item-selection case, but it will do nothing in Chrome (in FF, it works fine). Which is fine for now. Let's see if anyone will ever report it.

Did you check if other keystrokes (Cmd+U, Ctrl+U) crash the editor?

I tried all combinations with U. For some reason Ctrl+U crashes the editor on master, but at the same time, this keystroke has no action even here, in a textarea or in CKEditor 4.

Was this page helpful?
0 / 5 - 0 ratings