From: Nicolas Coden Date: Mon, 10 Sep 2018 20:57:38 +0000 (+0200) Subject: Use pull request #11485 from ncoden/fix/tabs-deep-link-custom-target-11484 for v6.5.0 X-Git-Tag: v6.5.0-rc.3^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6a360e72184dca6c768601bb7c38c74db68f6ed;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Use pull request #11485 from ncoden/fix/tabs-deep-link-custom-target-11484 for v6.5.0 f974a5b1f fix: use data-tabs-target to update history in Tabs deep-linking #11484 Signed-off-by: Nicolas Coden --- diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index c0d8eb0a4..b59a10cda 100644 --- a/js/foundation.tabs.js +++ b/js/foundation.tabs.js @@ -253,12 +253,10 @@ class Tabs extends Plugin { //either replace or update browser history if (this.options.deepLink && !historyHandled) { - var anchor = $target.find('a').attr('href'); - if (this.options.updateHistory) { - history.pushState({}, '', anchor); + history.pushState({}, '', hash); } else { - history.replaceState({}, '', anchor); + history.replaceState({}, '', hash); } }