Disable panel horizontal scroll when text is entered in textfield

。_饼干妹妹 提交于 2019-12-10 16:35:25

问题


I want to disable horizontal scroll of panel when someone enter text in text field.

First problem:
Currently problem is when you enter text in any textfield and press right arrow key from keyboard (keyCode = 39) then panel horizontal also move in right direction. I want to diable that when text is entered in textfield.

second Problem
Horizontal scroll moves with key only when click on that panel.
Fiddle : https://fiddle.sencha.com/#view/editor&fiddle/1mjd

    Ext.create('Ext.panel.Panel', {
    scrollable: 'horizontal',
    region: 'center',
    layout: 'hbox',
    baseCls: '',
    containerScroll: true,
    items: [{
        xtype: 'panel',
        items: [{
            xtype: 'textfield'
        }],
        width: 300,
        height: 400,
        margin: '0 0 0 9'
    }, {
        xtype: 'panel',

        items: [{
            xtype: 'textfield'
        }],
        width: 300,
        height: 400,
        margin: '0 0 0 9'
    }, {
        xtype: 'panel',
        items: [{
            xtype: 'textfield'
        }],
        width: 300,
        height: 400,
        margin: '0 0 0 9'
    }, {
        xtype: 'panel',
        items: [{
            xtype: 'textfield'
        }],
        width: 300,
        height: 400,
        margin: '0 0 0 9'
    }, {
        xtype: 'panel',
        items: [{
            xtype: 'textfield'
        }],
        width: 300,
        height: 400,
        margin: '0 0 0 9'
    }, {
        xtype: 'panel',
        items: [{
            xtype: 'textfield'
        }],
        width: 300,
        height: 400,
        margin: '0 0 0 9'
    }, {
        xtype: 'panel',
        items: [{
            xtype: 'textfield'
        }],
        width: 300,
        height: 400,
        margin: '0 0 0 9'
    }],
    renderTo: Ext.getBody()
});

Thanks in Advaned

来源:https://stackoverflow.com/questions/41157515/disable-panel-horizontal-scroll-when-text-is-entered-in-textfield

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!