2010-02-12 12 views
1

我想知道是否有人可以幫我解決這個問題。每當我將其模態配置設置爲true的Ext.Window顯示在FF和IE中時,它都能正常工作,我的意思是彈出窗口後面的所有內容都被屏蔽了,而在Safari和Chrome中則不然。當我嘗試向下滾動頁面時,我可以看到蒙版是有限的,這不是我想要發生的事情,因爲即使窗口尚未關閉,也可以在父頁面上輕鬆做一些操作。有人能幫助我嗎?提前Thanx。 :DModal ExtJS窗口在Safari和Chrome中無法掩蓋它背後的所有內容

回答

0

它應該在Safari和Chrome開箱即可使用。我剛剛在Safari 4.0.4 Mac中驗證了this page,並且它在滾動和/或調整瀏覽器大小時可以正常工作。有可能你的特定瀏覽器/平臺在Ext中存在一個bug,但這是一個基本的功能,我懷疑它。那個網頁適合你嗎?

1

我以爲也許這會發生,如果你是不是運行在Viewport,所以我舉了一個簡單的例子。事實證明,在這個例子中,模式掩碼在Safari中工作就好了。試一試,看看你的代碼不同。

<html> 
    <head> 
    <link rel="stylesheet" href="ext-3.1.1/resources/css/ext-all.css" /> 
    <script src="ext-3.1.1/adapter/ext/ext-base.js"></script> 
    <script src="ext-3.1.1/ext-all-debug.js"></script> 
    <script> 
     Ext.BLANK_IMAGE_URL = 'ext-3.1.1/resources/images/default/s.gif'; 
     Ext.onReady(function(){ 
     var p = new Ext.Panel({ 
      renderTo: 'panel', 
      html: 'this is the panel', 
      tbar: [{ 
      text: 'Show a Modal Window', 
      handler: function() { 
       new Ext.Window({ 
       title: 'Title', 
       html: 'Try scrolling - the entire page should be modal', 
       modal: true 
       }).show(); 
      } 
      }] 
     }); 
     }); 
    </script> 
    </head> 
    <body> 
    <h1 style="height:100px;background-color:green;">html page</h1> 
    <div id="panel"></div> 
    <h1 style="height:1200px;background-color:green;">html page</h1> 
    </body> 
</html> 
0

這有助於將Ext.Msg.show()警報的z-index設置爲從他們打開的窗口的前面。

Ext.WindowMgr.zseed = 10000; 
相關問題