Commit 336d35e2 authored by Dries's avatar Dries

- Patch #535966 by casey, jablko: add ':target' to selector for removing 'collapsed' class.

parent 24db763b
......@@ -60,7 +60,8 @@ Drupal.behaviors.collapse = {
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');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment