Index: modules/toolbar/toolbar.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.js,v
retrieving revision 1.19
diff -u -p -r1.19 toolbar.js
--- modules/toolbar/toolbar.js	8 Jun 2010 05:16:29 -0000	1.19
+++ modules/toolbar/toolbar.js	15 Nov 2010 03:01:35 -0000
@@ -19,6 +19,14 @@ Drupal.behaviors.toolbar = {
       $(window).triggerHandler('resize');
       return false;
     });
+
+    $(window)
+      // Ensure the toolbar doesn't hide content when named anchor is clicked.
+      .bind('hashchange.drupal-toolbar', Drupal.toolbar.hashchange)
+      // Trigger the hashchange handler once, after the page is loaded, to
+      // handle hash in original page request.
+      .triggerHandler('hashchange.drupal-toolbar');
+
   }
 };
 
@@ -94,6 +102,20 @@ Drupal.toolbar.toggle = function() {
   }
 };
 
+/**
+ * Adjust scrolltop so toolbar doesn't hide content when URL includes hash.
+ */
+Drupal.toolbar.hashchange = function (event) {
+  if (window.location.hash != '') {
+    $anchor = $(window.location.hash);
+    if ($anchor.length) {
+      var scrollLocation = $anchor.offset().top - Drupal.toolbar.height();
+      $(window).scrollTop(scrollLocation);
+    }
+  }
+};
+
+
 Drupal.toolbar.height = function() {
   var height = $('#toolbar').outerHeight();
   // In IE, Shadow filter adds some extra height, so we need to remove it from
Index: modules/toolbar/toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.46
diff -u -p -r1.46 toolbar.module
--- modules/toolbar/toolbar.module	5 Oct 2010 19:59:10 -0000	1.46
+++ modules/toolbar/toolbar.module	15 Nov 2010 03:01:35 -0000
@@ -189,6 +189,7 @@ function toolbar_view() {
       'js' => array(
         $module_path . '/toolbar.js',
         array('data' => 'misc/jquery.cookie.js', 'group' => JS_LIBRARY, 'weight' => 2),
+        array('data' => 'misc/jquery.ba-bbq.js', 'weight' => JS_LIBRARY + 2),
         array(
           'data' => array('tableHeaderOffset' => 'Drupal.toolbar.height'),
           'type' => 'setting'
