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] n.closest() not a function #1317

Closed
LasseRB opened this issue Sep 20, 2020 · 7 comments · Fixed by #1600
Closed

[Bug] n.closest() not a function #1317

LasseRB opened this issue Sep 20, 2020 · 7 comments · Fixed by #1600
Labels

Comments

@LasseRB
Copy link

LasseRB commented Sep 20, 2020

Hi there! I'm new here!
I was playing around with EditorJS in firefox when I suddenly get a Uncaught TypeError: n.closest is not a function exception. I get this on the editorjs.io website as well as my own projects.

Steps to reproduce:

  1. Go to editorjs.io and open the console in the dev tools
  2. Scroll down to the editor_landing demo on the front page.
  3. Remove a block using the tune settings button.
  4. You should get a exception in the console which stems from a get() command in editor.bundle.js

Screenshots:
image

Device, Browser, OS:
MacOS Mojave Version 10.14.6
Firefox 80.0.1 (64-bit)
Editor.js version:
In my project, the version of EditorJS is 2.18.0.

Let me know if you need more information or if I'm missing something obvious.
Thanks!

@LasseRB LasseRB added the bug label Sep 20, 2020
@bobmagicii
Copy link

bobmagicii commented Oct 9, 2020

i am also seeing this error when deleting blocks. also on firefox.

@fouchekeagan
Copy link

I am also getting this error on firefox.

@muster-mark
Copy link

Happens when moving or deleting a block

@emirsagit
Copy link

I am also getting this error on firefox.

@slaveofcode
Copy link

Me too, error on firefox 82.0.3 (64-bit)

@drj-sharma
Copy link

same

@bobmagicii
Copy link

bobmagicii commented Dec 11, 2020

the editor is working but i am a saddened by no response, convinced myself to switch to this project a few months ago and now im a little concerned. i mean it didn't cost me anything other than time but i really like how this works.

gohabereg added a commit that referenced this issue Apr 8, 2021
* Release 2.19.2 (#1597)

Save 2.19.2 changes

* 1317
The selection node sometimes ends up being the ShadowRoot which does not have the closest method.
In case it is the shadowroot - I believe we can assume the selection is not at the editor zone

Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
Co-authored-by: George Berezhnoy <gohabereg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants