ExtJS组合框有时隐藏在窗口灰色背后

时间:2010-09-27 13:58:08

标签: javascript asp.net vb.net extjs

因此,当用户在ExtJS弹出模式窗口中选择Save时,将调用以下代码。此窗口仅包含组合框。现在,有时当用户保存它,然后稍后重新打开它时,组合框将显示在窗口全部变灰,无法到达。其他时候,它会很好并且有效,并且在任何时候发生的事件都没有区别,只是完全不一致。

有谁知道这可能是什么?

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

2 个答案:

答案 0 :(得分:1)

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

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

不漂亮,但有效。

答案 1 :(得分:0)

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

我放了

win.close();

之后

win.subProductId.setValue('');

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