diff --git a/misc/collapse.js b/misc/collapse.js index 512ff2f..113c127 100644 --- a/misc/collapse.js +++ b/misc/collapse.js @@ -59,7 +59,7 @@ 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. - var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : ''; + var anchor = location.hash && location.hash != '#' && window.location.hash.indexOf("#/") != 0 ? ', ' + location.hash : ''; if ($fieldset.find('.error' + anchor).length) { $fieldset.removeClass('collapsed'); } diff --git a/misc/vertical-tabs.js b/misc/vertical-tabs.js index 3aa0f6f..d822381 100644 --- a/misc/vertical-tabs.js +++ b/misc/vertical-tabs.js @@ -50,7 +50,7 @@ Drupal.behaviors.verticalTabs = { if (!tab_focus) { // If the current URL has a fragment and one of the tabs contains an // element that matches the URL fragment, activate that tab. - if (window.location.hash && $(this).find(window.location.hash).length) { + if (window.location.hash && window.location.hash.indexOf("#/") != 0 &&$(this).find(window.location.hash).length) { tab_focus = $(this).find(window.location.hash).closest('.vertical-tabs-pane'); } else {