Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

Handle Cannot be SVG Element

Open lewishowles opened this issue 9 years ago • 4 comments

I have noticed that the Handle selector does not work if the element is an SVG.

I think it's best explained by this example: http://jsbin.com/qikejotuge/edit?html,js,output

I have tried the SVG branch but I don't think this is what that is for.

lewishowles avatar May 23 '17 11:05 lewishowles

I wrapped your svg in a div and used that div class as the handle and that worked.

<li> <div class='sortable__handle'> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="sortable__handle"><path d="M15 7h-14c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM15 1h-14c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM15 13h-14c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z"/></svg> </div> Lorem ipsum dolor. </li>

aintJoshinya avatar May 23 '17 13:05 aintJoshinya

Yes, that works perfectly (this is what I ended up doing) but would be nice if it wasn't needed

lewishowles avatar May 23 '17 13:05 lewishowles

Is there any update on this bug?

SVGs can be used as handles but only if the selector is set to svg; using .className or svg.className doesn't work.

PeterShaggyNoble avatar Oct 16 '18 15:10 PeterShaggyNoble

This seems to have been resolved.

PeterShaggyNoble avatar Jul 04 '19 14:07 PeterShaggyNoble