A triple-click can leave the browser selection outside the hidden input
surface (it reads as "\n"). That selection is not editable, so typed
keys fired keydown but no input, and never reached the WASM editor.
Move the selection back into the surface before plain keys reach the
browser, and after double and triple clicks.
Closes#12187
AI-assisted-by: claude-opus-5-5