【发布时间】:2014-03-20 11:40:13
【问题描述】:
当我触摸文本字段时,键盘出现但没有焦点并且键盘隐藏文本字段。
在 Android 中完美运行,但在 IOS 中我遇到了如图所示的问题
如果我触摸文本字段用户或通过键盘显示,但如果我写不起作用并且键盘隐藏所有视图。
如果箭头上的脉冲 (),视图向上滚动并聚焦在文本字段上,但我需要在第一时间使焦点和视图向上滚动。
我的代码:
Ext.define("com.app.Access", {
extend: 'Ext.form.Panel',
xtype: 'access',
requires: ['Ext.form.FieldSet','Ext.form.Password'],
config: {
pack: 'center',
style: 'background-color:#FFFFFF',
scrollable: 'vertical',
cls: 'Login',
items: [
{
xtype: 'panel',
styleHtmlContent: true,
html: '<img class="img100" src="resources/images/image.jpg"/>',
},
{
xtype: 'fieldset',
title: 'Identification',
styleHtmlContent: true,
items: [
{
xtype: 'textfield',
name: 'user',
label: 'User',
labelWidth: '40%',
required: true
},
{
xtype: 'passwordfield',
name: 'password',
label: 'Pass',
labelWidth: '40%',
required: true
},
{
xtype: 'button',
itemId: 'accessButton',
ui: 'action',
text: 'Access'
}
]
}
]
}
});
有什么帮助吗??谢谢!!
【问题讨论】:
-
我不使用 iOS 代码,我使用的是 cordova 和 phonegap
标签: ios cordova sencha-touch