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
TypeError: evt.target.closest is not a function #234
Comments
Thanks for reporting! I've added it to my radar. Actually, a better fix would be to use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bliss.delegate(document.body, "dragstart", "[draggable=true]", function(e) { /* nothing */ });
leads to the exception in the title if one drags a text, because a dragstart event runs, and is handled here:
evt.target unfortunately is a text in this case, and has no closest() method.
A fix is simple:
if (evt.target.closest && evt.target.closest(selector)) {
(tested, works)
btw: bliss is great. thank you very much.
The text was updated successfully, but these errors were encountered: