
marshall at mroch
Mar 12, 2009, 6:44 PM
Post #3 of 3
(1040 views)
Permalink
|
|
Re: [8502] Fix for bug #1390, newer versions of Safari properly handle
[In reply to]
|
|
On Mar 12, 2009, at 5:38 PM, David E. Wheeler wrote: > On Mar 12, 2009, at 2:19 PM, rolfm [at] bricolage wrote: > >> Fix for bug #1390, newer versions of Safari properly handle >> autocomplete forms. > > LOL! Nice that it was that easy! How does it work? navigator.appVersion is something like: 5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/ 528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16 indexOf("AppleWebKit") is either -1 (not found) or the column where the text "AppleWebKit" starts (always way greater than 3, in all versions of Safari)... To detect Safari versions you have to parse out the number after AppleWebKit (528.16 for Safari 4). See http://trac.webkit.org/wiki/DetectingWebKit . I think this change appears to work in new WebKit because it always returns false, but actually breaks older WebKits. -- Marshall
|