Save point: use touchend-based double-tap detection for reliable skip on all scenes
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user