]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: use a safer selector for targetted tab title in "Tabs.selectTab" 11486/head
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 2 Sep 2018 20:32:25 +0000 (22:32 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 2 Sep 2018 20:32:25 +0000 (22:32 +0200)
See https://github.com/zurb/foundation-sites/pull/11486

js/foundation.tabs.js

index 1afbcde58bd8dd6d585da14b3db174859b1a994b..c9d2aa43c578271a9a6566c99927c32a6add253c 100644 (file)
@@ -333,7 +333,7 @@ class Tabs extends Plugin {
       idStr = idStr.slice(1);
     }
 
-    var $target = this.$tabTitles.find(`[href$="${hashIdStr}"],[data-tabs-target="${idStr}"]`).first().parents(`.${this.options.linkClass}`);
+    var $target = this.$tabTitles.has(`[href$="${hashIdStr}"],[data-tabs-target="${idStr}"]`).first();
 
     this._handleTabChange($target, historyHandled);
   };