Commit 093f99a7 authored by Dries's avatar Dries

- Patch #376293 by casey, Dave Reid, droidenator, moshe weitzman: activate...

- Patch #376293 by casey, Dave Reid, droidenator, moshe weitzman: activate current vertical tab from URL fragment.
parent afdf0f6c
......@@ -49,7 +49,14 @@ Drupal.behaviors.verticalTabs = {
$('> li:last', tab_list).addClass('last');
if (!tab_focus) {
tab_focus = $('> .vertical-tabs-pane:first', this);
// 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 && $(window.location.hash, this).length) {
tab_focus = $(window.location.hash, this).closest('.vertical-tabs-pane');
}
else {
tab_focus = $('> .vertical-tabs-pane:first', this);
}
}
if (tab_focus.length) {
tab_focus.data('verticalTab').focus();
......
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