Deleting a widget with the keyboard removes the whole body #5125
Labels
plugin:widget
The plugin which probably causes the issue.
status:confirmed
An issue confirmed by the development team.
type:bug
A bug.
Milestone
Bug
Since CKEditor version 4.16.1, deleting a widget using the keyboard (BACKSPACE or DELETE) can lead to the whole document
body
element being removed. Unsurprisingly, the editor isn't usable anymore after that.For reproduction purposes, the JSFiddle sample below adds a very simple widget consisting of just one
img
tag. Just place the cursor behind the "deleteme" text and then delete the text and the image using BACKSPACE. When CKEditor determines the next element to apply the "fake selection" to, the outcome will be the body, which will then be removed.According to my own investigation, this was probably caused by the fix done in #1572.
The error is still there in the latest version. In 4.16.0 it still works fine.
http://jsfiddle.net/transporthummel/xnm3sebc/5/
Expected result
The widget is selected by the fake selection and then removed.
Actual result
Instead of selecting the widget, the document body is removed, making the editor unusable.
The text was updated successfully, but these errors were encountered: