editor.insertHtml
pollutes editable with empty spans
#2813
Labels
status:confirmed
An issue confirmed by the development team.
support:2
An issue reported by a commercially licensed client.
type:bug
A bug.
Milestone
Type of report
Bug
Provide detailed reproduction steps (if any)
Foo {Bar}
.insert
below editor.Expected result
Selected part is removed. And there is no empty element left.
Actual result
Empty span is left behind editor which is visible by red border.
Other details
These empty elements can't be focused (checked Chrome, Safari, Firefox), and they are removed on
getData
. They should be removed right away oninsertHtml
, because when styled they might be visible in editor.https://github.com/ckeditor/ckeditor-dev/blob/002ec74de01c50d48e1ba2101785126a56407eeb/core/editable.js#L1719-L1723
☝️ This is where they ale splitted upon insertions, and when splitting leaves empty elements it's best place to clean them up.
The text was updated successfully, but these errors were encountered: