Skip to content

Last symbol before noneditable element can't be removed. #5679

Open
@versusvirus

Description

@versusvirus

What is the current behavior? Describe the bug
If user paste inline noneditable element then type 1 symbol after it then press backspacke, symbol won't be delete and caret will be before it.

Please provide the steps to reproduce and if possible a minimal demo of the problem via fiddle.tinymce.com or similar.
http://fiddle.tinymce.com/cjhaab
What is the expected behavior?
Symbol can be removed

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
5.*+ Latest chrome

P.S.
I debugged it.
Before that line execution https://github.com/tinymce/tinymce/blob/master/modules/tinymce/src/core/main/ts/delete/CefBoundaryDelete.ts#L27
HTML is <p>Hello <span class="noneditable">world</span>"65279;1"</p>
and current range is correct, but after execution that line caret moves to self block and HTML is
<p>Hello <span class="noneditable">world</span>"65279;""1"</p> and range is broken, then https://github.com/tinymce/tinymce/blob/master/modules/tinymce/src/core/main/ts/delete/CefBoundaryDelete.ts#L34 that line will restore range to delete incorrectly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions