From f10ba02fdb4fd394291920fb17e50a85dc3019f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 19 Jul 2016 14:03:50 +0200 Subject: [PATCH] js: tab-widget cookie ignorieren wenn url hash vorhanden MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Unter bestimmten umständen funktioniert das direkte Springen auf einen Tab sonst nicht. --- js/kivi.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/kivi.js b/js/kivi.js index 3ee73a708..f194b8107 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -252,7 +252,10 @@ namespace("kivi", function(ns) { if (elementId) { var cookieName = 'jquery_ui_tab_'+ elementId; - tabsParams.active = $.cookie(cookieName); + if (!window.location.hash) { + // only activate if there's no hash to overwrite it + tabsParams.active = $.cookie(cookieName); + } tabsParams.activate = function(event, ui) { var i = ui.newTab.parent().children().index(ui.newTab); $.cookie(cookieName, i); -- 2.20.1