Selecting textPath and other camelcase elements #925

tmcw opened this Issue Nov 27, 2012 · 4 comments


5 participants

tmcw commented Nov 27, 2012

It appears that 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


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: (getElementsByTagName) (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