From d6d6177dd95fb9003f66b745e16f877be2cdbfd6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 8 Sep 2026 00:54:01 +0000 Subject: [PATCH] Fix on-screen keyboard clearing fields on frameworks like Authelia's React UI The keyboard-type IPC handler set input.value directly and dispatched a plain "input" event. React (and similar frameworks) patch the value setter on input/textarea instances to track the last value they set; setting el.value directly updates that tracker too, so React never detects a real change and its controlled state stays empty. The next re-render (moving focus to another field, toggling a checkbox, etc.) then redraws the input from that stale empty state, wiping out whatever was typed. Route the writes through the native value setter instead so the tracker stays out of sync and the dispatched event actually reaches the framework's handler. Also give the "Tab" key its own handler that moves focus to the next focusable element, instead of falling through to the generic branch that typed the literal word "Tab" into the field. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01V1D2cv1KyFoYGnwSdszeXm --- kiosk-app/main.js | 53 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/kiosk-app/main.js b/kiosk-app/main.js index 93bf85a..3108da5 100644 --- a/kiosk-app/main.js +++ b/kiosk-app/main.js @@ -1492,17 +1492,37 @@ async function createWindow(){ } if(!view||!view.webContents)return; - + const safeKey=JSON.stringify(key).slice(1,-1); - + + // Sets the value through the native /