From c57aa2ac5e1431ff28e89ff3581cde08f3973339 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Wed, 31 Mar 2010 17:04:35 -0700 Subject: [PATCH] Fix for menu bar being broken if displayed after a window is ordered front in IE. Reviewed by me. --- AppKit/Platform/DOM/CPPlatform.j | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AppKit/Platform/DOM/CPPlatform.j b/AppKit/Platform/DOM/CPPlatform.j index 98d7ca02e..2c2c971b4 100644 --- a/AppKit/Platform/DOM/CPPlatform.j +++ b/AppKit/Platform/DOM/CPPlatform.j @@ -40,6 +40,10 @@ var screenNeedsInitialization = NO, return; screenNeedsInitialization = [CPPlatform isBrowser]; + + // We do this here because doing it later breaks IE. + if (document.documentElement) + document.documentElement.style.overflow = "hidden"; } + (BOOL)isBrowser @@ -121,9 +125,6 @@ var screenNeedsInitialization = NO, bodyElement.style.overflow = "hidden"; - if (document.documentElement) - document.documentElement.style.overflow = "hidden"; - [[CPNotificationCenter defaultCenter] postNotificationName:CPPlatformDidClearBodyElementNotification object:self];