Commit d0ddd91f authored by Dries's avatar Dries

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

parent b4634929
......@@ -58,8 +58,9 @@ Drupal.behaviors.collapse = {
attach: function (context, settings) {
$('fieldset.collapsible', context).once('collapse', function () {
var $fieldset = $(this);
// Expand if there are errors inside.
if ($('.error', $fieldset).length) {
// 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) {
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