Skip to content

Commit

Permalink
Merge pull request #12464 from ameotoko/fix/tabs-history
Browse files Browse the repository at this point in the history
fix: do not corrupt location.href when changing deep-linked tabs
  • Loading branch information
joeworkman authored Sep 27, 2024
2 parents 3ea67b0 + 45d5620 commit 29b7a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/foundation.tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ class Tabs extends Plugin {
//either replace or update browser history
if (this.options.deepLink && !historyHandled) {
if (this.options.updateHistory) {
history.pushState({}, '', anchor);
history.pushState({}, '', location.pathname + location.search + anchor);
} else {
history.replaceState({}, '', anchor);
history.replaceState({}, '', location.pathname + location.search + anchor);
}
}

Expand Down

0 comments on commit 29b7a32

Please sign in to comment.