fix(android): let Vue re-render before auto-login submits the password
Dispatch the Enter keydown two frames after the input event so the login button is enabled when it arrives. Keeps auto-login working against nodes running older web builds where controller-nav's Enter-in-input pattern would otherwise click Replay Intro (see the matching web-ui fix). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
70587210fb
commit
b6468ebf3c
@ -741,7 +741,16 @@ private fun buildAutoLoginScript(password: String): String {
|
|||||||
var setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
|
var setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
|
||||||
setter.call(el, pw);
|
setter.call(el, pw);
|
||||||
el.dispatchEvent(new Event('input', { bubbles: true }));
|
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);
|
}, 1500);
|
||||||
})();
|
})();
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user