PDA

View Full Version : Keyboard dismissal problem



ssdesign
29 Sep 2010, 9:59 AM
Hi,
I have a form like this, the problem is, when I click one of the text fields, the keyboard pops-up. But when I press the close button, the keyboard remins open.

Second issue is, how can I also make the keyboard "go" button perform the Submit action?



this.formBasePublish = {
scroll: false,
standardSubmit : false,
items: [
xtype: 'fieldset',
title: 'Group1',
defaults: {
required: true,
labelAlign: 'left'
},
items: [{
itemId: 'nameid',
xtype: 'textfield',
name : 'name',
label: 'Name',
id: 'nameid',
autoCapitalize : false
},
{

xtype: 'textfield',
name : 'author',
label: 'Author',
id: 'nameid',
autoCapitalize : false
}]
}
],
dockedItems: [
{
xtype: 'toolbar',
dock: 'bottom',
items: [
{
xtype: 'spacer'
},
{
text: 'Close',
handler: function() {
formPublish.getComponent('nameid').fieldEl.dom.blur();
formPublish.hide({type : 'fade'});
}
},
{
text: 'Submit',
ui: 'action',
handler: function() {
doSubmit();
}
}
]
}
]
};
//
Ext.apply(formBasePublish, {
autoRender: true,
floating: true,
modal: true,
centered: true,
hideOnMaskTap: true,
height: 530,
width: 520
});
this.formPublish = new Ext.form.FormPanel(formBasePublish);

mikeyroy
29 Sep 2010, 12:52 PM
For the first issue, if you're using PhoneGap you need to add a java class that you submit a javascript call to, it's easy enough to find just google 'phonegap hideKeyBoard'.

meQ
29 Sep 2010, 11:51 PM
We had this problem before: http://www.sencha.com/forum/showthread.php?108488-iphone-ipad-keyboard-dismissal-problem&highlight=keyboard+dismissal

This worked for me!