【问题标题】:The message window hides behind the panel消息窗口隐藏在面板后面
【发布时间】:2013-05-13 07:18:00
【问题描述】:

在可编辑单元格上单击选项卡时,消息窗口隐藏在面板后面。

例如:双击第一个手机单元格,按TAB键。您可以看到消息框,然后隐藏在网格窗口后面。

Ext.create('Ext.data.Store', {
    storeId: 'simpsonsStore',
    fields: ['name', 'email', 'phone'],
    data: {
        'items': [{
            'name': 'Lisa',
            "email": "lisa@simpsons.com",
            "phone": "1224"
        }, {
            'name': 'Bart',
            "email": "bart@simpsons.com",
            "phone": "1234"
        }, {
            'name': 'Homer',
            "email": "home@simpsons.com",
            "phone": "1244"
        }, {
            'name': 'Marge',
            "email": "marge@simpsons.com",
            "phone": "1254"
        }]
    },
    proxy: {
        type: 'memory',
        reader: {
            type: 'json',
            root: 'items'
        }
    }
});

var table = Ext.create('Ext.grid.Panel', {
    title: 'Simpsons',
    store: Ext.data.StoreManager.lookup('simpsonsStore'),
    columns: [{
        text: 'Name',
        dataIndex: 'name',
        editor: {
            xtype: 'textfield'
        }
    }, {
        text: 'Email',
        dataIndex: 'email',
        flex: 1
    }, {
        text: 'Phone',
        dataIndex: 'phone',
        editor: {
            xtype: 'numberfield',
            hideTrigger: true,
            validateOnChange: false
        }
    }],
    height: 200,
    width: 400,
    plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
        clicksToEdit: 2
    })],
    listeners: {
        'validateedit': function () {
            Ext.MessageBox.show({
                icon: Ext.MessageBox.ERROR,
                buttons: Ext.MessageBox.OK,
                title: 'test',
                msg: 'test'
            });
        }
    }
});
tablePanel.add(table);
tablePanel.show();

});

有人遇到过这样的问题吗?

【问题讨论】:

    标签: javascript extjs window messagebox


    【解决方案1】:

    我从煎茶网站得到了答案:

    我看到它在 4.07 中没有这样做,但在 4.1 中。我会和开发团队谈谈。

    目前,您可以使用 defer:

    Code:
    listeners:{
        'validateedit':function(){
            Ext.MessageBox.show({
            icon: Ext.MessageBox.ERROR,
            buttons: Ext.MessageBox.OK,
            title: 'test',
            msg: 'test'
          }).defer(100);
        }
    }
    

    【讨论】:

    • 你和开发团队谈过了吗?
    猜你喜欢
    • 1970-01-01
    • 2013-10-05
    • 1970-01-01
    • 1970-01-01
    • 2018-11-29
    • 1970-01-01
    • 2023-01-03
    • 1970-01-01
    • 2023-02-17
    相关资源
    最近更新 更多