From c6d37c42e968e5507731afe8c371a19f30724772 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Sun, 9 Sep 2018 18:33:17 +0200 Subject: [PATCH] fix: close the active Tab when going back to a "tab-less" history state See https://github.com/zurb/foundation-sites/pull/11477#issuecomment-419678146 --- js/foundation.tabs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index 9b71069cb..d1d2a3f6a 100644 --- a/js/foundation.tabs.js +++ b/js/foundation.tabs.js @@ -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) { -- 2.47.2