From 9e86ff94e9e23249f30550e485614c4720afa38e Mon Sep 17 00:00:00 2001 From: avi Date: Sun, 17 May 2026 21:03:07 -0500 Subject: [PATCH] Save point: use touchend-based double-tap detection for reliable skip on all scenes --- index.html | 18 +++++++++++++++--- www/index.html | 18 +++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 1573aab..96bbf09 100644 --- a/index.html +++ b/index.html @@ -5837,9 +5837,21 @@ html[data-view="mobile"] #exfilDeskCanvas { max-height: 500px; } }); // Double-click/tap to skip scene (same as Escape on desktop) - document.addEventListener('dblclick', () => { - document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })); - }); + if (isAndroidApp) { + let lastTapTime = 0; + document.addEventListener('touchend', (e) => { + const now = Date.now(); + if (lastTapTime > 0 && now - lastTapTime < 400) { + e.preventDefault(); + document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })); + } + lastTapTime = now; + }); + } else { + document.addEventListener('dblclick', () => { + document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })); + }); + } // Keyboard shortcuts for testing document.addEventListener('keydown', (e) => { diff --git a/www/index.html b/www/index.html index 1573aab..96bbf09 100644 --- a/www/index.html +++ b/www/index.html @@ -5837,9 +5837,21 @@ html[data-view="mobile"] #exfilDeskCanvas { max-height: 500px; } }); // Double-click/tap to skip scene (same as Escape on desktop) - document.addEventListener('dblclick', () => { - document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })); - }); + if (isAndroidApp) { + let lastTapTime = 0; + document.addEventListener('touchend', (e) => { + const now = Date.now(); + if (lastTapTime > 0 && now - lastTapTime < 400) { + e.preventDefault(); + document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })); + } + lastTapTime = now; + }); + } else { + document.addEventListener('dblclick', () => { + document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true })); + }); + } // Keyboard shortcuts for testing document.addEventListener('keydown', (e) => {