Here's the issue:
Dynamically changing a div's overflow property with JS causes the contents of that div to repaint/re-render - only in Firefox. In any other browser the div's overflow property resizes and the contents are NOT re-rendered.
Okay not a big deal, it may just cause the contents to flicker as they reload however, if you have a Flash item contained in this div
(like I do), and then programmatically change the div
's overflow property this means the Flash movie will return to it's original starting state.
I've done very bare-bones testing on this, with a simple:
&l开发者_高级运维t;div id="overflow_div" style="overflow:hidden;">
<flash object>
</div>
<a href="javascript:change_overflow();">Change Overflow</a>
<script language="javascript" type="text/javascript">
function change_overflow() {
overflow_div = document.getElementyById('overflow_div');
overflow_div.style.overflow = (overflow_div.style.overflow=="hidden")? visible : "hidden";
}
</script>
Clicking the 'change overflow' causes the Flash object to return to its initial state in FF, but not in IE. This can be very frustrating when you're trying to create a dynamic experience with Flash and the Page interacting with one another...
So my question is simply:
Is there any known resolution to this?
OR
Is there any reason why this issue still exists in FF?
- There is no way to prevent a reframe on overflow changes in Gecko.
- Yes; fixing it requires a pretty serious rewrite of how plug-ins are hooked into the DOM and rendering tree in Gecko. It's being worked on; see https://bugzilla.mozilla.org/show_bug.cgi?id=90268.
精彩评论