PDA

View Full Version : Safari ignores beginUpdate



brian
13 Mar 2007, 4:29 AM
Safari - Mac OS X 10.4.8 build 8L127, 1GHZ PowerBook G4 2GB RAM

ignores beginUpdate();

The Ext framework still works fine but on monitor resize, the entire browser flashes white for a sec and gets jumpy while it resizes.


http://bordee.com/images/screenshots/SafariScreenSnapz001.jpg

jack.slocum
13 Mar 2007, 4:45 AM
Do you have hideOnLayout set to true?

brian
13 Mar 2007, 4:48 AM
yes

brian
13 Mar 2007, 5:05 AM
set it to false and it did the same thing. I googled a bit and think that I have found a solution, although I won't be able to try it out till I wake up this afternoon(been coding and refreshing all night).

http://www.robgoodlatte.com/2007/02/16/hacking-safari-rounding-bugs/
from the site:

Update: By adding a simple delay, the flash-to-white problem has been solved.

window.onload = resizeIfOdd;
window.onresize = forceSafariEven;

function resizeIfOdd(){
if(navigator.userAgent.indexOf('Safari') != -1)
if(document.documentElement.clientWidth % 2 == 1)
window.resizeBy(-1,0);
};

function forceSafariEven(){
window.setTimeout('resizeIfOdd()',5);
};

brian
16 Mar 2007, 10:52 AM
I looked into fixing the resize issue, but couldn't figure it out. It's low priority on my list, so I will get around to it later, and post a solution.