Issue #3362409 by durifal, mrinalini9, klausi, mcdruid, poker10: Vertical tabs result in jQuery error when overlay-context hashtag is added to URL
parent
ecf339b6d9
commit
ca316a5cbc
|
@ -50,8 +50,11 @@ Drupal.behaviors.verticalTabs = {
|
||||||
if (!tab_focus) {
|
if (!tab_focus) {
|
||||||
// If the current URL has a fragment and one of the tabs contains an
|
// If the current URL has a fragment and one of the tabs contains an
|
||||||
// element that matches the URL fragment, activate that tab.
|
// element that matches the URL fragment, activate that tab.
|
||||||
if (window.location.hash && $(this).find(window.location.hash).length) {
|
|
||||||
tab_focus = $(this).find(window.location.hash).closest('.vertical-tabs-pane');
|
// Remove any characters that jquery does not accept in find().
|
||||||
|
var hash = window.location.hash.replace(/[=%;,\/]/g, "");
|
||||||
|
if (hash !== '#' && $(this).find(hash).length) {
|
||||||
|
tab_focus = $(this).find(hash).closest('.vertical-tabs-pane');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tab_focus = $('> .vertical-tabs-pane:first', this);
|
tab_focus = $('> .vertical-tabs-pane:first', this);
|
||||||
|
|
Loading…
Reference in New Issue