TEA-ebook/teabook-open-reader

Scale/move doesn't work under iPad with iOS 5.1

eunomie opened this issue · 4 comments

With an iPad (iOS 5.1) scale and move doesn't work, but on an iPad mini (iOS 6) it works.

The problem is a little hard to describe, so here is how to reproduce it. The best is to do it on an iPad 5 and an iPad mini 6 (perhaps only iOS version is important...) and see the difference :

  • go to http://jsfiddle.net/rJ9xn/
  • run
  • you must see an image, inside blue and red containers (that's good) or a blue block inside a red one (so bad)
  • double tap or pinch to zoom
  • drag your finger to translate the image

The html is only divs with an iframe and embeded html (with base64 image).
The javascript uses https://github.com/eightmedia/hammer.js and just some events to move all the things.

This is based on the code of wip/zoom_and_multitouch branch

Here is a smaller example : http://jsfiddle.net/LZSzM/4/
The result should be :
image

The two jsfiddle don't correctly work under iOS5 (webkit version has no srcdoc on iframe)
But here is a better version (content is in the js) which works on an iPad with iOS 5 : http://jsfiddle.net/GGKJ9/
The main problem is always here, but now it's possible to test it.

Problem is related to the iframe. The version http://jsfiddle.net/UTSrm/9/ works fine...

OK, done in 7b867de : scale/translate the body and not the iframe