From 85bb92bb4f093c2086e5553f239676e9a6086b3e Mon Sep 17 00:00:00 2001 From: Dominic DiTaranto Date: Mon, 29 Dec 2025 18:36:58 -0500 Subject: [PATCH] fixing touch --- assets/js/dialog.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/assets/js/dialog.js b/assets/js/dialog.js index 4d0565d..c6ea24a 100644 --- a/assets/js/dialog.js +++ b/assets/js/dialog.js @@ -20,7 +20,7 @@ class Dialog { dialogListener(event) { console.log(event) - if (event.key === 'Enter' || event.type === 'click' || event.type === 'touchend') { + if (event.key === 'Enter' || event.type === 'click' || event.type === 'touchstart') { event.currentTarget.self.startIntroDialogSequence() } } @@ -28,7 +28,7 @@ class Dialog { startIntroDialogSequence() { document.removeEventListener("keydown", this.dialogListener); document.removeEventListener('click', this.dialogListener) - document.removeEventListener('touchend', this.dialogListener) + document.removeEventListener('touchstart', this.dialogListener) if (this.currentDialogIndex > this.dialogOrder.length - 1) { this.dialogElem.style.display = 'none' dialogMode = false @@ -53,12 +53,8 @@ class Dialog { var self = this document.addEventListener('keydown', this.dialogListener) - - if (controlsMode) { - console.log('hello') - document.addEventListener('click', this.dialogListener) - document.addEventListener('touchend', this.dialogListener) - } + document.addEventListener('click', this.dialogListener) + document.addEventListener('touchstart', this.dialogListener) document.self = self }