Skip to content

Conversation

@amoydavid
Copy link

fix #2852

  • Add handling for contenteditable='false' elements
  • Implement findFirstEditableTextNode helper function

…ents

- Add handling for contenteditable='false' elements
- Implement findFirstEditableTextNode helper function
Comment on lines +79 to +88
if (focusNode.nodeType !== Node.TEXT_NODE) {
const textNode = findFirstEditableTextNode(focusNode);
if (textNode) {
focusNode = textNode;
focusOffset = 0;
} else {
// If no editable text node found, return null
return [null, 0];
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, write tests for both cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When I tried to delete the first <span contenteditable='false'> tag of a block, it raised an error

2 participants