Closed Bug 1699682 Opened 5 years ago Closed 5 years ago

Intermittently getting too many focus outlines on Windows (browser.display.show_focus_rings should probably be false on windows too?)

Categories

(Core :: Widget: Win32, defect)

defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

Intermittently, on my windows nightly, I see too many outlines (i.e., I see an outline when visiting `data:text/html,<button>ABC</button> and clicking on the button).

Itiel came up with some more consistent STR. Quoting:

open data:text/html,<button>ABC</button> in one tab, and in another open about:restartrequired
with the mouse, click the Restart Nightly
after Nightly restarts, go back to the data tab
click the ABC ==> no focusring
go back to the about:restartrequired tab, focus the Restart Nightly button and press Enter on the keyboard
after Nightly restarts go back to the data tab, click the ABC ==> focusring

But for me mach run will show the issue about 1 in 4 times.

Debugging a bit locally, it seems we set the UI state here or here but we never get the WM_UPDATEUISTATE message to hide the focus.

I'm not sure if this is a windows issue or not. I'll debug a bit more because the double negatives confuse me a bit. Changing the pref works around it at least, but maybe it's the right fix if we're intending to initialize the state to hide the focus.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

UIS_INITIALIZE does something like setting the flag if the last input event was
a mouse event or clearing it if it was a keyboard event. Unfortunately, if this
is initialized to always show focus rings we start always showing outlines for
all content, all the time, which is both undesired and confusing.

It's also not clear from the docs which event it looks at specially at
startup, but anyhow the result we get is clearly flaky, from my testing.

Explicitly clear the flag. It's not clear to me if other applications can cause
the state to change... but otherwise maybe we can just remove the code dealing
with these flags?

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2dc3348b4132 Consistently initialize UI state to hide focusrings by default. r=mhowell
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Blocks: 1698151
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: