Selecting textPath and other camelcase elements #925

Closed
tmcw opened this Issue Nov 27, 2012 · 4 comments

Comments

5 participants

tmcw commented Nov 27, 2012

It appears that d3.select cannot select textPath elements, but only textpath, and Chrome is case-sensitive when it comes to that particular element.

Here's a simple pseudo-testcase for this behavior

Owner

mbostock commented Nov 27, 2012

Alas, this is a bug in WebKit. They fixed getElementsByTagName, but querySelector and querySelectorAll remain broken and there's been no recent activity:

https://bugs.webkit.org/show_bug.cgi?id=46800 (getElementsByTagName)
https://bugs.webkit.org/show_bug.cgi?id=83438 (querySelector, querySelectorAll)

@mbostock mbostock closed this Nov 27, 2012

prcweb commented May 10, 2013

I think I've hit this bug. My workaround is to use a class 'textpath' or similar. Then use

d3.selectAll('.textpath') etc.

Seems to work...

@prcweb thanks for that workaround! I was snagged on this all afternoon 👍

hdngr commented Aug 2, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment