1

I am using Hammer to detect a pinch on an HTML5 page and direct it to an SVG image for zooming. The SVG image is in its own div and the Hammer pinch detection is attached to that div.

This works fine on the latest versions of IE, Safari (mobile and desktop), Opera and Chrome but not on Firefox. On Firefox, the pinch is not detected by Hammer and thus is not directed to the SVG element. It instead zooms other items on the page.

I am also using Hammer to detect a pan action (again on the SVG) and this works properly on all browsers including Firefox.

So I think I am just missing some Firefox directive to prevent it from capturing the pinch event before Hammer sees it.

I do notice however that it doesn't work using Firefox on the Hammer touch test page so maybe it is a Firefox fix I need to wait for.

1 Answer 1

1

This link might help what's the situation is for firefox now regarding pinch zoom. https://bugzilla.mozilla.org/show_bug.cgi?id=1052253.

Pinch zoom(just for the svg element) works great in chrome. In IE I used jquery.panzoom.js,ie-touch.js for zooming for now. But for Firefox I don't have a clue.

1
  • Also is hammer.js good enough ?. I looked at the browser support hammerjs.github.io/browser-support and they say pinch won't work with latest desktop IE, Chrome, Firefox. Asking this because I want to pinch in IE without panzoom.js and ie-touch.js .... too many js files for me..... Commented Sep 4, 2015 at 10:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.