* Gracefully skip redirect-to-fragment on WebKit versions less than 420;
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Dec 2006 20:39:43 +0000 (20:39 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 19 Dec 2006 20:39:43 +0000 (20:39 +0000)
  it messes up on current versions of Safari but is ok in the latest
  nightlies. Checking the version number will allow it to automatically
  work when new releases of Safari appear.

RELEASE-NOTES
includes/DefaultSettings.php
skins/common/wikibits.js

index 0541e3a..f081d6d 100644 (file)
@@ -348,6 +348,11 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5411) Remove autopatrol preference; users who can mark edits patrolled
   will now have their edits marked as such regardless
 * (bug 8109) Template parameters ignored in "recentchangestext"
+* Gracefully skip redirect-to-fragment on WebKit versions less than 420;
+  it messes up on current versions of Safari but is ok in the latest
+  nightlies. Checking the version number will allow it to automatically
+  work when new releases of Safari appear.
+
 
 == Languages updated ==
 
index 1676de6..84a2456 100644 (file)
@@ -1041,7 +1041,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '34';
+$wgStyleVersion = '35';
 
 
 # Server-side caching:
index 9f9a9f0..55fca49 100644 (file)
@@ -851,6 +851,15 @@ function sortableTables() {
 }
 
 function redirectToFragment(fragment) {
+       var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/);
+       if (match) {
+               var webKitVersion = parseInt(match[1]);
+               if (webKitVersion < 420) {
+                       // Released Safari w/ WebKit 418.9.1 messes up horribly
+                       // Nightlies of 420+ are ok
+                       return;
+               }
+       }
        if (is_gecko) {
                // Mozilla needs to wait until after load, otherwise the window doesn't scroll
                addOnloadHook(function () {