From ecb7b9ba24626c33173a13691ac23fa9d15726a1 Mon Sep 17 00:00:00 2001 From: Jason Johnston Date: Sat, 26 Jun 2010 10:37:04 -0600 Subject: [PATCH] Make VisibilityStyleInfo reset the runtimeStyle's visibility before asking currentStyle whether the element is visible; fixes problem where the VML would disappear in IE6 after initial rendering, because the way we hide borders in IE6 is by setting visibility:hidden on the outer element. --- sources/VisibilityStyleInfo.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sources/VisibilityStyleInfo.js b/sources/VisibilityStyleInfo.js index 9236b63..2eae730 100644 --- a/sources/VisibilityStyleInfo.js +++ b/sources/VisibilityStyleInfo.js @@ -11,9 +11,18 @@ PIE.VisibilityStyleInfo = PIE.StyleInfoBase.newStyleInfo( { }, parseCss: function() { - var cs = this.element.currentStyle; + var el = this.element, + rs = el.runtimeStyle, + cs = el.currentStyle, + rsVis = rs.visibility, + csVis; + + rs.visibility = ''; + csVis = cs.visibility; + rs.visibility = rsVis; + return { - visible: cs.visibility !== 'hidden', + visible: csVis !== 'hidden', displayed: cs.display !== 'none' } },