-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails when clicking on SVG graphics #22
Comments
A workaround is set |
Hrm im not sure if we should actually do something here or just document this |
Yeah, only "fix" I can think of now is: var node = e.target;
while (node && !node.click) {
node = node.parentNode;
}
if (node) node.click(); |
@eirikurn pretty much but the css solution is a lot nicer but far less automatic |
Am facing this on android browsers – however I'm thinking the dropHammer: function( e ) {
if ( e.target.click ) {
if ( e.type === "touchend") {
e.target.focus();
// Wait for next tic so events fire in proper order
setTimeout( function() {
e.target.click();
}, 0 );
}
// Prevent the click which will come after this otherwise but with a 300ms delay
e.preventDefault();
}
}, I think this is preferable than making assumptions about clicking through to the parent? |
I am also experiencing this on an iPad. The |
This happens when the target of the touch events is a SVG element, e.g. a button/link that contains an SVG icon.
A JavaScript error occurs on
e.target.click()
, as svg elements don't have that method.The text was updated successfully, but these errors were encountered: