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

Uncaught DOMException: Failed to execute 'removeChild' on 'Node' in jquery-3.1.1 #112

Open
YovavGad opened this issue Feb 19, 2017 · 5 comments

Comments

@YovavGad
Copy link

I'm getting this error in the browser console when adding the same tag name twice, for example, adding tag1, tag1,

Also, both tags are removed (instead of keeping the original one)

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler?
at Ja (https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.1.1.min.js:3:16117)

jQuery tagEditor v1.0.20

@yairza
Copy link

yairza commented Feb 20, 2017

Its also reproduceable on the Demos page 'Basic setting': add duplicate value using space as delimeter

@rodrigorrch
Copy link

+1

@netr
Copy link

netr commented Mar 12, 2018

I fixed it by adding a try { } catch on line 201 like this:

$('.tag-editor-tag', ed).each(function(){ if ($(this).text() == tag) { try { input.closest('li').remove(); } catch(e){} } });

@max-zinn
Copy link

max-zinn commented Apr 5, 2018

see #117

There is also a corresponding Pull-Request #119 which, in my opinion, fixes this bug very well.

@zachrybaker
Copy link

Another way to reproduce:
type any tag, type comma to separate and create tag. Now type backspace, followed by comma again. Boom. Error.

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

6 participants