From: Nicolas Coden Date: Fri, 31 Aug 2018 21:40:57 +0000 (+0200) Subject: fix: use data-tabs-target to update history in Tabs deep-linking #11484 X-Git-Tag: v6.6.0~3^2~103^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f974a5b1f;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: use data-tabs-target to update history in Tabs deep-linking #11484 Closes https://github.com/zurb/foundation-sites/issues/11484 --- diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index 1b191366c..17ab129b0 100644 --- a/js/foundation.tabs.js +++ b/js/foundation.tabs.js @@ -252,12 +252,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); } }