Caps lock indicator sampler for password fields

Chromium #41271565 Status: New Priority: P4 Severity: S5

Purpose

This page is a manual sampler for the non-Mac Caps Lock indicator behavior in password fields.

On Linux, with the patch applied, a focused password input should show a Caps Lock indicator when Caps Lock is on.

How to test on Linux

  1. Open this page in your patched Chromium build.
  2. Click Focus password field.
  3. Toggle Caps Lock on and press any letter key while the password field is focused.
  4. Toggle Caps Lock off and press another letter key.
  5. Verify the browser-level indicator appears only while Caps Lock is on.

Run from local Chromium build

autoninja -C out/Default chrome
out/Default/chrome --user-data-dir=/tmp/caps-lock-profile \
  "https://static.januschka.com/i-41271565/"

Live sampler

This custom field uses JS to show CAPS when focused and Caps Lock is ON.

Last key event
none
event.getModifierState('CapsLock')
OFF
Focused element
none

Note: The status above comes from JS key events. The bug fix itself is about the native password field indicator drawing logic.

The icon is drawn only for fields that keep native appearance. Heavily author-styled controls (for example with custom appearance, borders, or full custom UI) may not show it.

    Links

    Issue 41271565

    CL 7705059