diff --git a/src/utils/modal.js b/src/utils/modal.js index 435153a..0f24fdb 100644 --- a/src/utils/modal.js +++ b/src/utils/modal.js @@ -80,9 +80,11 @@ class RenderScripture { constructor(dialog) { this.dialog = dialog; + /*history.replaceState({dialog: false}, ''); window.addEventListener('popstate', (evt) => { + console.log("popState", evt); this.closeDialog(); - }); + });*/ if (hasLocalStorage()) { this.ls = true; @@ -126,11 +128,12 @@ class RenderScripture { .classList.remove('hidden'); this.buildTranslationList(this.sel); this.readScripture(refs); - history.pushState({ + console.log("pushState()"); + /*history.pushState({ dialog: true, scripture: scripture.value, tx: this.translation - }, ''); + }, '', '#dialog');*/ } buildTranslationList(sel) { @@ -154,6 +157,8 @@ class RenderScripture { this.dialog[0]?.close(); this.dialog[0]?.classList.add('hidden'); this.dialog[0]?.querySelector('article')?.replaceChildren(); + history.replaceState({}, '', ''); + //history.back(); } txnOnChange(evt) {