4.0 KiB
Two-factor layout and native insertion correction — 2026-11-25
The owner confirmed Android Chrome pastes only the first digit; Windows desktop paste works. The old page handles the desktop paste event, but not native multi-character beforeinput. A trusted Chromium keyboard.insertText("123456") reproduced the failure: beforeinput.data contained six digits, then maxlength="1" reduced input.data to 1. Manual typing and desktop Ctrl+V already worked.
The earlier acceptance used a constructed ClipboardEvent and prevented submission. It exercised the desktop handler but neither the mobile insertion path nor an actual POST. That evidence was insufficient for the reported mobile behaviour.
The existing component now captures paste and multi-character beforeinput at the form, validates exactly six ASCII digits after conventional space normalization, populates all six boxes and requests submission once. The submit latch also permits retries after client cancellation and page restoration. No server authentication, TOTP, recovery or database code changed. Component-only CSS centres the label, button group and recovery text; card dimensions and branding remain unchanged.
Verification
PlotLine.Tests/Browser/two-factor-otp.cjs exercises the actual compiled Razor view and ordinary assets in Chromium. A private loopback fixture substitutes only the authentication service result with a controlled rejection: real MVC POST, antiforgery, model validation and error-page reload remain active. It never authenticates a real account and is not part of the deployed application.
At desktop, 390px and 320px, genuine clipboard writes followed by Ctrl+V pass for plain codes, surrounding whitespace, grouped digits, leading zero and nonbreaking spaces. All six boxes and the combined value are observed before exactly one actual POST. Trusted native insertion also passes. Malformed content makes no POST. Typing, backspace, corrections, keyboard navigation, manual submission, cancelled submission retry and rejected-code retry pass. The separate setup view retains its original single input.
The three after screenshots were visually inspected: compact horizontal boxes, centred label/actions/recovery text, natural mobile wrapping and no overflow. Desktop, 390px, 320px. Structured clipboard evidence uses synthetic codes only.
Physical Android Chrome confirmation remains an owner acceptance check; trusted native insertion reproduces the identified event mechanism but is not a physical Android test. Production deployment is not authorised for this correction.
Development activation
Clean source 9b1770d96d17b7b2cc4f42efb936d822d20fe31e was published and signed as otp-9b1770d9-20261125. The exact published assembly passed the same browser checks before activation. Development activation completed in 23.79 seconds, including verified pre-deployment backup, unchanged 321-entry migration history, no executed migrations, configuration/persistent-path preservation, DLL identity, database health and public HTTPS/CSS checksum checks. Successful application release history was recorded after health passed. See sanitised deployment evidence.
The browser checks were repeated after activation using the exact published Razor assembly in the controlled fixture and the stylesheet fetched from Development over normal HTTPS. All passed. This is controlled rejection testing, not a claim of real-account authentication or physical Android testing. Production was not changed.
A diagnostic command accidentally printed the private Development SQL connection value to tool output during this task. No credential was written into these committed artifacts. Rotation through the established administrative procedure is recommended; credentials were not changed as part of this focused correction.