【问题标题】:ExtJS combobox sometimes hides behind window greyed outExtJS 组合框有时会隐藏在灰色的窗口后面
【发布时间】:2010-09-27 13:58:07
【问题描述】:

因此,当用户在 ExtJS 弹出模式窗口上选择“保存”时,将调用以下代码。此窗口仅包含一个组合框。现在,有时当用户保存它,然后稍后重新打开它时,组合框会出现在窗口后面,全部变灰,无法访问。其他时候,它会很好并且工作,两次发生的事件没有区别,只是完全不一致。

有谁知道这可能是什么?

var changeProductOK = function() {
            var win = getChangeProductWindow();
            if (win.subProductId.getValue() == '') {
                Global.alert('Choose a product');
                return;
            }
            win.hide();
            PropertiesWin.hide();

            Global.confirm('You sure?', 'Confirm', function(result) {
                if (result) {
                    Global.mask('Changing the product', workspacePanel.getEl());
                    WorkspaceController.ChangeProduct(applicationId, win.subProductId.getValue(), function(response) {
                        Global.unmask(workspacePanel.getEl());

                        if (!response) {
                            showWorkflowMessages([{ Type: 0, Text: 'A timeout occurred while changing the product.  Please try again.'}]);
                            return;
                        }
                        if (response.Data.Result == false) {
                            showWorkflowMessages(response.Data.Messages);
                        } else {
                            Global.mask('Reloading the application');
                            reloadWorkspace();
                        }
                    });
                }
                win.subProductId.setValue('');
            });
        }

【问题讨论】:

    标签: javascript asp.net vb.net extjs


    【解决方案1】:

    问题与涉及 z-indexes 的某种错误有关。我只是通过添加以下内容来确保 z-index 比窗口高一点来修复它:

    <style>
        .x-combo-list {z-index: 10000 !important} /* A hack to fix superboxselect dropdowns showing up behind window */
    </style>
    

    不漂亮,但很管用。

    【讨论】:

      【解决方案2】:

      我正在回答我如何解决这个问题,但如果您知道防止这种情况发生的常用方法,请在它让我接受之前发布其他答案。

      我放了

      win.close();
      

      紧接着

      win.subProductId.setValue('');
      

      这样,每次成功保存完成时它都会破坏模式,因此它将始终作为初始窗口加载(每次都有效)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多