【问题标题】:Combobox disappears on disable in IE Extjs组合框在 IE Extjs 中禁用时消失
【发布时间】:2011-12-20 08:00:39
【问题描述】:

我有一个组合框,可以根据特定条件启用和禁用。

 reportTypCombo: new Ext.form.ComboBox({
        id: 'reportTyp',
        name: 'reportTyp',
        valueField: 'value',
        displayField: 'value',
        typeAhead: true,
        fieldLabel: 'Type',
        allowBlank: false,
        forceSelection: true,
        triggerAction: 'all',
        store: ReportManager.Form.Stores.typeComboStore,
        mode: 'local',
        lastQuery: '',
        listeners: {
            expand: function(combo) {
                 .....
            },
            select: function(combo, record) {
                 ....
            },
            change:function(combo, newValue){
                 ....
            }
        }

当我打电话时

reportTyp = form.findById('reportTyp');
reportTyp.setDisabled(false);

它在 IE 中消失。

请指导我。

我尝试了链接http://www.sencha.com/forum/showthread.php?84452-Combobox-disappears-on-disable-in-IE-7但无法解决。

【问题讨论】:

  • 您使用的是哪个版本的 IE 和 ExtJS?
  • reportTyp.enable() 工作吗?
  • 我的同事遇到了类似的问题,在隐藏和禁用组合时,然后再次显示它,在 IE 7/8 中它会消失,除了第一个 17px 会出现在它的左侧(触发器的宽度)。在 Firebug 中玩了一下,我发现您可以在 CSS 中添加以下内容来“破解”它 - 可能值得一试:.x-form-field-trigger-wrap.x-item-disabled-ie { width:自动!重要; }
  • 你有没有尝试过doLayout,在你的行动之后?

标签: internet-explorer extjs extjs3


【解决方案1】:

我过去遇到过这个问题,解决它的方法是从页面中删除文档类型。 你累了吗?

【讨论】:

    【解决方案2】:

    使用Ext.getCmp('reportType').setDisabled(false);

    使用ext.getCmp()函数通过extjs中的id获取所需组件

    【讨论】:

      猜你喜欢
      • 2021-06-10
      • 2011-03-12
      • 1970-01-01
      • 2015-11-11
      • 1970-01-01
      • 2016-11-27
      • 2011-08-19
      • 1970-01-01
      • 2012-12-01
      相关资源
      最近更新 更多