Skip to main content

Bug Tracker

Side navigation

#13420 closed bug (fixed)

Opened February 08, 2013 07:06PM UTC

Closed February 09, 2013 02:37AM UTC

Last modified May 24, 2013 01:43PM UTC

jQuery 1.9.1 fails to filter SVG parent nodes by class name when using .parent() and .closest()

Reported by: Owned by:
Priority: low Milestone: 1.10/2.0
Component: selector Version: git
Keywords: Cc:
Blocked by: Blocking:

When using the parent and closest methods to walk up an SVG DOM tree in jQuery 1.9.1, filtering by selector does not work.

It looks *possible* Sizzle changed their XML element detection...

Attachments (0)
Change History (6)

Changed February 08, 2013 08:06PM UTC by gibson042 comment:1

component: unfiledselector
priority: undecidedlow
resolution: → duplicate
status: newclosed

Duplicate of #12626.SVG is not HTML; use [class~="name"]:

Changed February 09, 2013 01:31AM UTC by anonymous comment:2

Thank you, I do understand this.

It is strange that maintaining a predictable API is taking a back seat here.

I went through the duplicates, this issue is re-occurring and this XML feature seems to appear and disappear in various jQuery versions. It works one day and not the next with "wont fix" as the resolution. Why not just fix it?

My bad for the duped report though. Appreciate you guys.

Changed February 09, 2013 02:37AM UTC by gibson042 comment:3

milestone: None1.9.2
resolution: duplicate
status: closedreopened

I understand and appreciate that viewpoint, but SVG support is peripheral to our primary purpose with jQuery core and thus not guaranteed, though we do incorporate fixes on a case-by-case basis when their size/performance impact is sufficiently small.

The jQuery SVG plugin attempts to provide better support, and you'll be happy to note that your particular application is in fact functional with the latest Sizzle update via jquery-git:

Changed February 09, 2013 02:37AM UTC by gibson042 comment:4

resolution: → fixed
status: reopenedclosed

Changed February 09, 2013 03:26AM UTC by comment:5

This is excellent. I appreciate your time.

Changed May 24, 2013 01:43PM UTC by dmethvin comment:6


Bulk update to milestone 1.10/2.0