]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Only remove #modalId from the url on close 9402/head
authorwebdevan <github@webdevan.co.za>
Tue, 22 Nov 2016 19:55:24 +0000 (21:55 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2016 19:55:24 +0000 (21:55 +0200)
Fixes #8908 - Made URL retain query string on close of deep-linked modal

js/foundation.reveal.js

index 7cae72d007f6bc1c559e370da3a9cde39f083011..df874d0ee61b734c4a49100de12e2657b75984df 100644 (file)
@@ -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 = '';
        }