Skip to content

Commit 29b7a32

Browse files
authored
Merge pull request #12464 from ameotoko/fix/tabs-history
fix: do not corrupt location.href when changing deep-linked tabs
2 parents 3ea67b0 + 45d5620 commit 29b7a32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/foundation.tabs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ class Tabs extends Plugin {
269269
//either replace or update browser history
270270
if (this.options.deepLink && !historyHandled) {
271271
if (this.options.updateHistory) {
272-
history.pushState({}, '', anchor);
272+
history.pushState({}, '', location.pathname + location.search + anchor);
273273
} else {
274-
history.replaceState({}, '', anchor);
274+
history.replaceState({}, '', location.pathname + location.search + anchor);
275275
}
276276
}
277277

0 commit comments

Comments
 (0)