From: webdevan Date: Tue, 22 Nov 2016 19:55:24 +0000 (+0200) Subject: Only remove #modalId from the url on close X-Git-Tag: v6.3-rc1~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9402%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Only remove #modalId from the url on close Fixes #8908 - Made URL retain query string on close of deep-linked modal --- diff --git a/js/foundation.reveal.js b/js/foundation.reveal.js index 7cae72d00..df874d0ee 100644 --- a/js/foundation.reveal.js +++ b/js/foundation.reveal.js @@ -453,7 +453,7 @@ class Reveal { this.isActive = false; if (_this.options.deepLink) { if (window.history.replaceState) { - window.history.replaceState("", document.title, window.location.pathname); + window.history.replaceState('', document.title, window.location.href.replace(`#${this.id}`, '')); } else { window.location.hash = ''; }