PDA

View Full Version : Prevent double-tap in iphone safari



Applelunatic
4 Oct 2010, 11:43 PM
Hi guys,

is it possible to prevent the double-tap (zoom function) in iPhone Safari? I'm working on Sencha App where this is very bad. Double-tapping hoses the layout, and there's no intuitive way to get it back.

Thanks for help!

jay@moduscreate.com
7 Oct 2010, 4:17 AM
In full-screen sencha touch apps, double tap does not zoom the screen.

evant
7 Oct 2010, 1:08 PM
What version are you using?

Applelunatic
7 Oct 2010, 10:32 PM
Hi! I`m using the version 0.95. V.0.96 throws the error "TypeError: Result of expression 'this.types[config.xtype || defaultType]' [undefined] is not a constructor." (Bug?) For me it is possible to double-tab on the Ext.Panel. How can I prevent that? Thanks for help!




var showCenteredOverlay = function(btn, event) {
overlay.setCentered(true);
overlayTb.setTitle('Meldung erstellen');
overlay.show();

};

// Add new Message
var overlay = new Ext.Panel({
id : 'messageform',
cls: 'htmlcontent',
autoRender: true,
floating: true,
centered: true,
height: 320,
width: 300,
modal : true,
hideOnMaskTap : false,
styleHtmlContent: true,
scroll: 'vertical',


items: [
{
xtype: 'fieldset',
title: 'Personal Info',
instructions: 'Please enter the information above.',
defaults: {
required: true,
labelAlign: 'left'
},
items: [{
xtype: 'textfield',
name : 'name',
id:'name',
label: 'Nachricht',

showClear: true,
// labelAlign: 'right',
autoCapitalize : false,
listeners: {
keyup: function(fld, e){
if (e.browserEvent.keyCode == 13){
e.stopEvent();
fld.fieldEl.dom.blur();
//massageform_addAction();
}
},
blur: function(fld, e){
hideKeyboard(fld);
}



}
}, {
xtype: 'fieldset',
title: 'Favorite color',
defaults: { xtype: 'radio' },
items: [
{ name : 'color', label: 'Red', inputValue : 'red' },
{ name : 'color', label: 'Blue' , inputValue : 'blue'},
{ name : 'color', label: 'Green' , checked : true, inputValue : 'green'},
{ name : 'color', label: 'Purple' , inputValue : 'purple'}
]
}]
}
],

dockedItems: [
{
xtype: 'toolbar',
dock: 'bottom',
items: [
{
text: 'Load Model',
ui: 'round',
handler: function() {
formBase.user = Ext.ModelMgr.create({
'name' : 'Akura'
}, 'User');

form.loadModel(formBase.user);
}
},
{xtype: 'spacer'},
{
text: 'Reset',
handler: function() {
form.reset();
}
},
{
text: 'Save',
ui: 'confirm',
handler: function() {
overlay.hide();
//tabpanel.show();
}
}
]
}
]

});

jay@moduscreate.com
8 Oct 2010, 4:07 AM
Are you just using ST to render a modal dialogue?

Animal
8 Oct 2010, 4:18 AM
Hi! I`m using the version 0.95. V.0.96 throws the error "TypeError: Result of expression 'this.types[config.xtype || defaultType]' [undefined] is not a constructor." (Bug?) For me it is possible to double-tab on the Ext.Panel. How can I prevent that? Thanks for help!]

Test your app on Chrome on your dev machine before running it on the target hardware.

Break on all errors and see which nonexistent xtype you are specifying.

Applelunatic
11 Oct 2010, 5:43 AM
@Animal Thanks for your recommendation! I found the changes in the new version and the webapp starts without errors. Only the new "segmentedbutton" switches, like in the map demo, won´t work with 0.96. Idea?