PDA

View Full Version : Desktop Safari -> No pinch gesture



PHANTOMIAS
27 Sep 2010, 6:45 AM
Hello!

I have a multi-touch display and all events works in this demo
http://dev.sencha.com/deploy/touch/examples/kitchensink/
except the pinch gesture.

The problem is, that pinching with two fingers the whole content of the website will be zoomed in/out. Is it possible to avoid this behavior? 1-2 weeks ago I read on an official Apple website that it is possible to avoid this, but I can not find it anymore. So, is it possible that I can enable this, so I can see in this demo (Events) the pinch gesture on a desktop webkit based browser?

Best Regards PHANTOMIAS

jay@moduscreate.com
27 Sep 2010, 10:54 AM
Hello!

I have a multi-touch display and all events works in this demo
http://dev.sencha.com/deploy/touch/examples/kitchensink/
except the pinch gesture.

The problem is, that pinching with two fingers the whole content of the website will be zoomed in/out. Is it possible to avoid this behavior? 1-2 weeks ago I read on an official Apple website that it is possible to avoid this, but I can not find it anymore. So, is it possible that I can enable this, so I can see in this demo (Events) the pinch gesture on a desktop webkit based browser?

Best Regards PHANTOMIAS

for pinch events, i would try the iPhone simulator or the direct hardware.

PHANTOMIAS
27 Sep 2010, 11:08 AM
Apple iPad is working. But I want to get it running in webkit desktop browser.

jay@moduscreate.com
27 Sep 2010, 11:10 AM
Apple iPad is working. But I want to get it running in webkit desktop browser.

Yeah - what you're asking for is an APPLE to WEBKIT issue, not a sencha touch issue.

PHANTOMIAS
27 Sep 2010, 11:23 AM
Does it support desktop browser? So is this a setting I have to make or or isn't this supported by Sencha?

jay@moduscreate.com
27 Sep 2010, 11:33 AM
Does it support desktop browser? So is this a setting I have to make or or isn't this supported by Sencha?

Dude, this is *not* a sencha touch issue. Go to any website with safari on an mac that supports pinch on a trackpad. You'll see that you can zoom that site!


demo: http://tdg-i.com/img/screencasts/2010-09-27_1533.mp4

PHANTOMIAS
27 Sep 2010, 11:41 AM
Hm, I know that I can zoom in with that gesture on any website, but I want to see an event "pinch" in this kitchensink demo, because I want to use it on iOS Safari and desktop Safari. So it seems that Desktop Safari handle this pinch as a zoom for the website and iOS Safari does not. So yes, it is not a Sencha Touch problem, but the developers know if it is in general possible that a Desktop Safari recognize the pinch, so for example if it is possible that I can put an image on a web app and with Sencha Touch only this image (not the whole website) is zoomable with a pinch gesture.

jay@moduscreate.com
27 Sep 2010, 11:43 AM
So you're using Sencha Touch for a desktop application? Are all of your customers mac safari users?

jay@moduscreate.com
27 Sep 2010, 11:47 AM
Hm, I know that I can zoom in with that gesture on any website, but I want to see an event "pinch" in this kitchensink demo, because I want to use it on iOS Safari and desktop Safari. So it seems that Desktop Safari handle this pinch as a zoom for the website and iOS Safari does not. So yes, it is not a Sencha Touch problem, but the developers know if it is in general possible that a Desktop Safari recognize the pinch, so for example if it is possible that I can put an image on a web app and with Sencha Touch only this image (not the whole website) is zoomable with a pinch gesture.


I did a simple google search and within minutes determined that this was not possible.

PHANTOMIAS
27 Sep 2010, 11:53 AM
Please can you give me an URL? And it is not possible because ...???

jay@moduscreate.com
27 Sep 2010, 1:00 PM
Please can you give me an URL? And it is not possible because ...???

I searched for "Pinch safari disable". Google is a free tool that you have access to.

PHANTOMIAS
27 Sep 2010, 11:51 PM
Okay, thank you. So you also found the one-year old apple discussions.

But one more time, I think I read on the Apple websites that it is possible to disable this gesture (programmatically with HTML/JavaScript).
So the basic question is not that I am a Safari user, I am a developer and I want to know if I can disable this with Sencha Touch or with another solution for desktop Safari.

PHANTOMIAS
28 Sep 2010, 12:10 AM
Oh, my fault, i Found the source. It is possible to prevent the default behavior of iOS Safari, not on desktop Safari browser.
So I have to wait til the gesture is available in Desktop Safari.

jmdesp
28 Sep 2010, 3:34 AM
I have a multi-touch display [...]
pinching with two fingers the whole content of the website will be zoomed in/out [...]

PHANTOMIAS, the trick that disables that behavior on iOS Safar is the "user-scalable=no" attribute for the viewport
http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html

If desktop Safari ignores this and always handle the pinch gesture itself instead of forwarding the event to the application, then I believe you are stuck.

PHANTOMIAS
28 Sep 2010, 3:38 AM
It's a pity. Hmm, so I have to wait if a webbrowser will handle this more multi-touch-friendly :-)
Google Chrome also have this behavior...