2010-09-27 63 views
1

因此,当用户在ExtJS弹出窗口模式窗口上选择保存时,将调用以下代码。该窗口只包含一个组合框。现在,有时当用户保存这些信息,然后再重新打开它时,组合框将显示在窗口后面全部变灰,无法到达。其他时间,这将是好的,工作,并没有任何时间发生事件的差异,只是完全不一致。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(''); 
      }); 
     } 

回答

0

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

我放在

win.close(); 

win.subProductId.setValue(''); 

它破坏了模态每次成功保存完成,因此它总是加载的初始窗口(这工作每次)

这样之后
1

该问题与涉及z索引的某种错误有关。我只是通过确定z-index比窗口高一点来加以修正:

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

不是很漂亮,但是很有效。