当我触摸文本字段时,键盘出现但没有焦点和键盘隐藏文本字段

时间:2014-03-20 11:40:13

标签: ios cordova sencha-touch

当我触摸文本字段时,会出现键盘但没有对焦和键盘隐藏文本字段。

在Android中运行完美,但在IOS中我遇到了问题,如图所示

IMAGE WITHOUT KEYBOARD

如果我触摸文本字段用户或通过键盘显示但是如果我写不起作用并且键盘隐藏所有视图。

IMAGE WITH KEYBOARD

如果箭头上的脉冲(<> ),视图会向上滚动并聚焦在文本字段上,但我需要在第一时间将焦点和视图向上滚动。 / p>

我的代码:

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'
                    }
                ]
            }
        ]
    }
});

任何帮助?谢谢!

1 个答案:

答案 0 :(得分:0)

iOS也遇到过这个问题。 我刚刚添加了$(&#39;#myInput&#39;)。focus()作为解决方法。

相关问题