The font menu, session combo and row menus focus whichever item the
pointer moves onto. When the search narrowed the list under a pointer that
hadn't moved, the redrawn item under it got a mouseenter too, took the
focus out of the search, and the next letters went nowhere. fonts.test.cjs
went red whenever the list landed while the pointer sat over the menu.
hoverFocus now remembers where the last mousemove was. A mouseenter there
is a redraw's (UI Events fires mouseenter before its mousemove), so it
leaves the focus where it is. A real move still focuses the item.
The new fonts test hovers an item, then types "HarmonyOS" into the search.
The focus has to stay in the field, and Enter has to pick HarmonyOS Sans SC.
- Broken by hand: with the old `b.onmouseenter = () => b.focus()`, the test
is red in chromium and webkit (the focus is on the item, and the typed
text is cut short).
- With the fix: green in both engines, 3 runs.
Full suite: node --test --test-concurrency=4 internal/gui/tests/*.test.cjs
(chromium and webkit) on a61a6f954 with all three of these commits'
changes: 10655 tests, 10616 pass, 39 fail, all in 16 top-level tests.
Each of their files was then run alone:
- green alone on origin/main 008571462 and on this tree (load):
import-link-gemini, market-have, plugin-page, readable-focus, text-size.
- red alone on main too, filed or commented:
- quota-count-wrap and quota-name-translated: #2228
- s3-sync: #2448
- usage-agents-hide: #2276
- usage-checkin: #2142
- usage-fold: #2163
- tray-usages: #2453, new
After rebasing onto 008571462, these were run again on this tree, alone:
- green: fonts, key-balance-card, plugin-move, i18n-keys.
- still red, the same as main: quota-name-translated, quota-count-wrap, tray-usages.
The full GUI run was not repeated after the rebase.
go test ./internal/gui on 008571462 plus these changes, sandbox HOME:
FAIL. The only failure is TestPanelJoinsFullScreenSpaces, which is #2450
and is red on main too. TestCoreScriptBudget passes.