### Eclipse Workspace Patch 1.0
#P drupal 7
Index: misc/collapse.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/collapse.js,v
retrieving revision 1.31
diff -u -r1.31 collapse.js
--- misc/collapse.js	14 May 2010 07:25:53 -0000	1.31
+++ misc/collapse.js	14 May 2010 11:08:41 -0000
@@ -60,7 +60,8 @@
       var $fieldset = $(this);
       // Expand fieldset if there are errors inside, or if it contains an
       // element that is targeted by the uri fragment identifier. 
-      if ($('.error, :target', $fieldset).length) {
+      var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : '';
+      if ($('.error' + anchor, $fieldset).length) {
         $fieldset.removeClass('collapsed');
       }
 
