-
8 Dec 2011 2:26 AM #1
Preventing zoom kills onclick
Preventing zoom kills onclick
REQUIRED INFORMATION
Ext version tested:- Touch 2.0-pr2
- Safari (iPad)
- ____
- After starting the Sencha application and loading the viewport, the browser no longer listens to onclick events on my iPad.
- Create a simple Hello World sencha application
- Add a DIV to the html with an onclick attribute
- Open the application in Safari on an iPad
- Working onclick (it does work on my Mac in Chrome/Safari)
- Onclick events are ignored
Code:// Sencha bug: doPreventZooming kills onClick Ext.define('Ext.viewport.Hacks', { override: 'Ext.viewport.Ios', doPreventZooming: function(e) {} });
-
8 Dec 2011 4:27 PM #2
This is expected behavior. If you want to listen to a Dom element in your application, you should create it dynamically using Ext.Element and then add listeners to that.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
8 Dec 2011 4:34 PM #3
I have an SVG container in my page and create SVG shapes in it (using jQuery SVG). I guess I won't be able to create those with Ext.Element.
Seems like a big enforcement to just prevent zooming.
-
9 Dec 2011 8:23 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
You can always turn off the zoom prevention as an option in your Viewport. There is still some work we are doing with this as the same type of issue happens with Google Maps.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote