Skip to main content

Bug Tracker

Side navigation

#2978 closed bug (invalid)

Opened June 04, 2008 03:04PM UTC

Closed January 08, 2009 10:46AM UTC

Possible $().ready() bug in Safari 3.1.1

Reported by: jmar777 Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.5
Keywords: document, ready, Safari, CSS Cc:
Blocked by: Blocking:

Just started following the tickets here, so sorry if this is a dupe.

I say "possible" bug because I am not sure what the specs are on this issue. Most browsers seem to load any external style sheets prior to executing the $().ready() method - however, this does not seem to be the case in Safari 3.1.1 (tested in Windows). This inconsistency was unexpected to myself, and I would assume to others as well. Needless to say, this causes problems if a script/plugin is dependent on said style sheets.

I am led to believe that the CSS is the culprit by two observations:

  • Such scripts execute successfully if run after the document.onload event.
  • Such scripts execute successfully if the CSS is inlined.

For a specific example, my Kwicks plugin ( pulls bits of information from an external style sheet, and therefore fails in Safari 3.1.1 (if executed by $().ready()).

I have only tested this with 1.2.3 and 1.2.6, which both exhibited this behavior.

Thanks for all the great work!

Attachments (0)
Change History (2)

Changed June 13, 2008 04:40PM UTC by jmar777 comment:1

I don't think I have the rights to do it myself, but I suggest that this issue be removed as a non-issue.

I have more recently discovered that the script also works if the CSS is included before the JS. My assumption now is that Safari 3.1.1 simply applies/runs the CSS/JS in the order that it is referenced, whereas other browsers *appear* to always apply the CSS first. I couldn't find any documentation regarding the "correct" approach, so I would not consider this to be a bug on the part of jQuery or Safari at this point.

I am still curious what would be considered "expected" browser behavior here, but that would be a discussion for a different venue. Thanks again!

Changed January 08, 2009 10:46AM UTC by davidserduke comment:2

resolution: → invalid
status: newclosed

Ticket closed at the request of the reporter.