]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: close the active Tab when going back to a "tab-less" history state
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 9 Sep 2018 16:33:17 +0000 (18:33 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 9 Sep 2018 16:33:17 +0000 (18:33 +0200)
See https://github.com/zurb/foundation-sites/pull/11477#issuecomment-419678146

js/foundation.tabs.js

index 9b71069cb6951588c0159fd42a3e1b471884cc26..d1d2a3f6a922191146fbf2ba52df8f6cbb590b4d 100644 (file)
@@ -118,6 +118,10 @@ class Tabs extends Plugin {
       if ($anchor && $anchor.length && $link && $link.length) {
         this.selectTab($anchor, true);
       }
+      // Otherwise, collapse everything
+      else {
+        this._collapse();
+      }
 
       // Roll up a little to show the titles
       if (this.options.deepLinkSmudge) {