Skip to content

Commit

Permalink
allow selection in readonly mode (#2920)
Browse files Browse the repository at this point in the history
  • Loading branch information
acywatson authored and thegreatercurve committed Nov 25, 2022
1 parent c6b6000 commit 11ff2f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/lexical/src/LexicalUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,11 @@ export function getNearestEditorFromDOMNode(
while (currentNode != null) {
// @ts-expect-error: internal field
const editor: LexicalEditor = currentNode.__lexicalEditor;
if (editor != null && !editor.isReadOnly()) {
if (editor != null) {
return editor;
}
currentNode = currentNode.parentNode;
}

return null;
}

Expand Down

0 comments on commit 11ff2f8

Please sign in to comment.