2010-09-27 61 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> 

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