Thank you for the test page.

Jonathan Snook said on November 17, 2006

Marco: yeah, display:none should be treated as if it doesn't exist in the document flow. But Safari treats it like it doesn't exist. :)

Tobie Langel said on November 18, 2006

Prototype deals with this issue by temporarily showing the hidden element with visibility set to hidden and position to absolute.

That bug has been aroun for a while, btw.

Jonathan Snook said on November 18, 2006

Tobie: actually, the getStyle method in Prototype doesn't do that. I believe some of the stuff within Scriptaculous does.

The fact that we're talking 2.0, I think the fact the bug still exists is self evident that it has been around for awhile. Despite that, a search on the matter didn't really reveal any insight, which is why I wanted to document it here.

Tobie Langel said on November 18, 2006

Jonathan, you are totally right...

Actually it is the getDimensions method which uses this technique.

But is should definitely be extended to getStyle in regards to what you mention.

I am sometimes surprised by the amount of bugs Safari has. We all spend our time bashing on IE, but if, for example, we cannot device a cross-browser rich text editor, it is not because of IE, but of Safari.

It is also because of Safari that we cannot have a cross browser way dealing with navigation history and back-button functionality when using Ajax.

Jonathan Snook said on November 18, 2006

Tobie: yeah... the problem with modifying the style of an object to use getStyle means that you could never use it to retrieve display or visibility values. Not a big deal, I'm sure but certainly a consideration.

Justin Halsall said on December 02, 2006

Luis: I disagree, Safari was the first browser to pass the Acid2 test, and is in some aspects a better browser than firefox, I would rather have Microsoft change there standard browser to Firefox as it is still lagging behind greatly.

And remember what happened with IE when they had the biggest market share, they stopped innovating. Now there are still some points Firefox can learn from Opera and Safari and if these go away then it will be impossible to learn from the other browsers.

Klaus hartl said on December 04, 2006

If some parent element has its display set to "none", than the mentioned fix still doesn't work...

DiaboliK said on October 10, 2007

safari (webkit) should and probably always will be bundled w/ apple software since webkit is intertwined into many of apple's applications nowadays. its even in itunes store for windows for petes sake.

plus webkit is so far the most css3 compliant browser around.

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.