Firefox 3.5 render iframe bug
前一陣子 Firefox 3.5 正式發表了
增加許多新的特色功能
不過都還沒來得及測試新功能
使用上就已經先發現了 Firefox 3.5 的 Bug
主要是在渲染 Flash Plugin 與 iframe 重疊畫面時不正常
假如頁面上同時有 flash 與 iframe 內容
將 flash html 屬性 wmode 設為 opaque
並且用 CSS z-index, position 將 iframe 疊在 flash 內容上
此時用滑鼠來回移動選擇 flash TextField 內的文字
就會發現 iframe 內容閃個不停
代碼:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
#flashContent {
position: absolute;
z-index: 1;
}
#iframe {
position: absolute;
width: 400px;
height: 100px;
top: 100px;
left: 150px;
z-index:2;
}
</style></head>
<body onload="document.getElementById('FlashID').focus();">
<div id="flashContent">
<object id="FlashID" type="application/x-shockwave-flash"
data="flashMovie.swf" width="400" height="300">
<param name="wmode" value="opaque" />
</object>
</div>
<div id="iframe">
<iframe width="400" height="100" src="iframe.html"></iframe>
</div></body></html>
實際執行時,用滑鼠慢慢的選取 Flash 文字
就會發現這兩種畫面不斷交替閃爍
以上的 Bug 主要發生在 windows 版本的 Firefox 3.5
在 Mac, Ubuntu 上都沒有遇到這樣的情況
Firefox 3.5 iframe bug sample file