From da0bfda6d41f3a864c5a4475066f1935f9075ebe Mon Sep 17 00:00:00 2001 From: Cyrille Chopelet Date: Sat, 1 Sep 2018 15:04:16 +0200 Subject: [PATCH] Fix a bug in tab changing When using deepLink options, the handleTabChange will fail if using a non-standard markup (if there are DOM levels between the `.tabs-title` and the `a`). This commit fixes precisely that. --- js/foundation.tabs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index 1b191366c..1afbcde58 100644 --- a/js/foundation.tabs.js +++ b/js/foundation.tabs.js @@ -333,7 +333,7 @@ class Tabs extends Plugin { idStr = idStr.slice(1); } - var $target = this.$tabTitles.find(`[href$="${hashIdStr}"],[data-tabs-target="${idStr}"]`).first().parent(`.${this.options.linkClass}`); + var $target = this.$tabTitles.find(`[href$="${hashIdStr}"],[data-tabs-target="${idStr}"]`).first().parents(`.${this.options.linkClass}`); this._handleTabChange($target, historyHandled); }; -- 2.47.2