Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13359 closed bug (notabug)

Google Chrome vs .remove

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: git
Keywords: Cc:
Blocked by: Blocking:


So I have a script that adds new span tags in a div, after adding say 6 tags I click the remove button on one of them which calls a function that uses: $(this).parents('span').remove();

The span is successfully removed from the dom, but the screen does not refresh to show it's gone ???

Chrome Version 24.0.1312.57

It used to work so something must have broke during an update of chrome, maybe I need a new version of jQuery, but im stuck as there are no relevant searches on the net.

May be a google bug not a jQuery bug, but now you are aware.

Change History (3)

comment:1 Changed 10 years ago by anonymous

Additional: I was using jQuery 1.7.1 and 1.9.x(latest) same results.

-- Clicking remove on the LAST span of the set will result in the artifact being left behind. Code for quick recreation: http://www.w2r.com/x/

comment:2 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

Your markup is invalid. You can't have divs within spans and the id values are numeric. Clean it all up, put an example on jsfiddle.net, ask for help on a forum to ensure it's really a bug, and post a new bug report if it is.

comment:3 Changed 10 years ago by anonymous

It was because I was using a span tag as the parent of a div. Confirmed this solved the issue. Thanks.

Note: See TracTickets for help on using tickets.