Skip to main content

Bug Tracker

Side navigation

#13359 closed bug (notabug)

Opened January 31, 2013 05:19PM UTC

Closed January 31, 2013 07:36PM UTC

Last modified January 31, 2013 07:51PM UTC

Google Chrome vs .remove

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

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.

Attachments (0)
Change History (3)

Changed January 31, 2013 07:24PM UTC by anonymous comment:1

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/

Changed January 31, 2013 07:36PM UTC by dmethvin comment:2

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.

Changed January 31, 2013 07:51PM UTC by anonymous comment:3

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