From f974a5b1f5f80bfb2e3df7dfad9ab919b50ce18c Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Fri, 31 Aug 2018 23:40:57 +0200 Subject: [PATCH] fix: use data-tabs-target to update history in Tabs deep-linking #11484 Closes https://github.com/zurb/foundation-sites/issues/11484 --- js/foundation.tabs.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/foundation.tabs.js b/js/foundation.tabs.js index 1b191366c1..17ab129b06 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); } }