Skip to content

Logic insert signature with quote incorrect#38

Merged
hoangdat merged 2 commits intomasterfrom
bugfix/logic-insert-signature-with-quote-incorrect
Jun 23, 2025
Merged

Logic insert signature with quote incorrect#38
hoangdat merged 2 commits intomasterfrom
bugfix/logic-insert-signature-with-quote-incorrect

Conversation

@dab246
Copy link
Member

@dab246 dab246 commented Jun 23, 2025

Issue

Cannot insert signature with quote

message: NotFoundError: The object can not be found here.

Root cause

This is a DOMException that usually occurs when trying to insertBefore() a node before a node that is no longer in the DOM or is not a direct child of the parent that is calling insertBefore on.

The statement causing the error: nodeEditor.insertBefore(signatureContainer, quotedMessage);. quotedMessage is not a direct child of nodeEditor, will throw NotFoundError

Solution

Check parentNode === nodeEditor before call insertBefore to avoid this error.

@hoangdat hoangdat merged commit 0a26842 into master Jun 23, 2025
1 check passed
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.

3 participants