Skip to content

Unable to stop Backspace or Delete key from removing a custom component #1583

@redfellow

Description

@redfellow

Describe the bug
I am unable to stop Backspace or Delete key from removing a component, and also se-linebreaker helper appears on top of the component when mouseovering it.

To Reproduce
Steps to reproduce the behavior:

  1. Add custom HTML into the editing area's root:
<content-viewer2-textinput class="se-component __se__tag" contenteditable="false"><h3>Component title</h3><div>.. additional code </div> </content-viewer2-textinput>
  1. Position cursor either above or below element, and you can remove it with Backspace or Delete
  2. Hover mouse cursor within the component and we see the "add new line" helper element, and clicking it adds a paragraph inside the component

Expected behavior
The component will not be affected by Backspace or Delete. Add new line helper is not ever visible inside the component.

Desktop (please complete the following information):

  • OS: Windows, MacOs
  • Browser Chrome
  • Version 141

Suneditor version

  • v2.47.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions