Skip to content

Commit

Permalink
fix: Form element focus in element view
Browse files Browse the repository at this point in the history
  • Loading branch information
areknawo committed May 6, 2024
1 parent b46e674 commit 01c90f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/web/src/lib/editor/extensions/element/node.tsx
Expand Up @@ -321,6 +321,13 @@ const Element = BaseElement.extend<Partial<ExtensionsContextData>>({
view?.deselectNode?.();
},
stopEvent(event) {
if (
event.target instanceof HTMLElement &&
["SELECT", "INPUT", "TEXTAREA"].includes(event.target.tagName)
) {
return true;
}

return false;
},
update(newNode, decorations, innerDecorations) {
Expand Down

0 comments on commit 01c90f5

Please sign in to comment.