From: Nicolas Coden Date: Mon, 26 Mar 2018 08:11:32 +0000 (+0200) Subject: fix: prevent Reveal opening with its hash already set to add history entry X-Git-Tag: v6.6.0~3^2~263^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88c08bd988c121d08c2daa6d2d69858e74a1b097;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: prevent Reveal opening with its hash already set to add history entry --- diff --git a/js/foundation.reveal.js b/js/foundation.reveal.js index 847d53f53..2029e970f 100644 --- a/js/foundation.reveal.js +++ b/js/foundation.reveal.js @@ -216,8 +216,8 @@ class Reveal extends Plugin { */ open() { // either update or replace browser history - if (this.options.deepLink) { - var hash = `#${this.id}`; + const hash = `#${this.id}`; + if (this.options.deepLink && window.location.hash !== hash) { if (window.history.pushState) { if (this.options.updateHistory) {