Safari Inline Script Bug Test Pages

Safari's WebCore and/or JavaScriptCore has a potential bug relating to inline scripts in documents with linked stylesheets. To illustrate this problem, I'm using a simple page with a form followed by an inline script which assigns focus to one of the form input fields. Safari 1.0 (v85) and OmniWeb 4.5 (v496) were the primary browsers used for testing.

All test pages are XHTML 1.0 Transitional unless otherwise noted.

Examples:

  1. Script inside DIV tag
  2. Script outside DIV tag
  3. Same as example 1, with @import used to import the stylesheet
  4. Same as example 1, HTML 4.01 Transitional
Note that many of these tests work on the first page load but fail on subsequent loads and reloads.

Workarounds:

  1. Same as example 1, no link tag
  2. Same as example 1, all style rules embedded in page
  3. Same as example 1, link to empty external JavaScript before focus() call

Note that workaround 3 inconsistently fails on reload.

All of these examples will focus on the first form element in WinMSIE, MacMSIE and Mozilla.

All pages validate. authored by Joe Maller, August 11, 2003