diff --git a/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt b/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt index 3bd16fff..f38a4ec9 100644 --- a/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt +++ b/Android/app/src/main/java/com/archipelago/app/ui/screens/WebViewScreen.kt @@ -741,7 +741,16 @@ private fun buildAutoLoginScript(password: String): String { var setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set; setter.call(el, pw); el.dispatchEvent(new Event('input', { bubbles: true })); - el.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true })); + // Let Vue re-render before submitting: a synchronous Enter arrives + // while the login button is still disabled, and the web UI's + // controller-nav "Enter in input clicks the next enabled button" + // pattern then hits Replay Intro instead — restarting the intro + // cinematic on every connect (two frames = value flush + render). + requestAnimationFrame(function () { + requestAnimationFrame(function () { + el.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true })); + }); + }); }, 1500); })(); """.trimIndent()