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 }