Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Got error Cannot read property of null when using LexicalClickableLinkPlugin and clicking on a non-link element #4514

Closed
vimutti77 opened this issue May 18, 2023 · 0 comments

Comments

@vimutti77
Copy link

Got error 'Cannot read property of null' when using 'LexicalClickableLinkPlugin' and clicking on a non-link element

Lexical version: 0.10.0

Steps To Reproduce

  1. Go to playground https://playground.lexical.dev
  2. Click on read-only mode.
  3. Click on any element in the editor that is not a link.
  4. See the error in console.

The current behavior

TypeError: Cannot read properties of null (reading 'href')
    at LexicalClickableLinkPlugin.dev.js:68:21
    at beginUpdate (Lexical.dev.js:8013:5)
    at updateEditor (Lexical.dev.js:8104:5)
    at LexicalEditor.update (Lexical.dev.js:10810:5)
    at HTMLDivElement.onClick (LexicalClickableLinkPlugin.dev.js:57:21)

The expected behavior

No error in console

@vimutti77 vimutti77 changed the title Bug: Got error 'Cannot read property of null' when using 'LexicalClickableLinkPlugin' and clicking on a non-link element Bug: Got error Cannot read property of null when using LexicalClickableLinkPlugin and clicking on a non-link element May 18, 2023
fantactuka added a commit that referenced this issue May 19, 2023
fantactuka added a commit that referenced this issue May 19, 2023
zurfyx pushed a commit that referenced this issue May 19, 2023
vuamitom pushed a commit to bitbriks/lexical that referenced this issue May 19, 2023
This was referenced May 23, 2023
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

No branches or pull requests

2 participants