Skip to content

test_tab_at_a_control_scrolled_away_goes_on_in_the_column_the_pointer_is_in[firefox]: Tab doesn't focus the control in the pointer's column (intermittent) #5742

Closed

Description

@leaf-agent

tests/browser/navigation/test_key_scopes.py::test_tab_at_a_control_scrolled_away_goes_on_in_the_column_the_pointer_is_in[firefox_browser-input] fails intermittently in Firefox. After Tab, #right-next never takes focus, and the wait times out with it inactive:

AssertionError: Locator expected to be focused
Actual value: inactive
  - Expect "to_be_focused" locator("#right-next") with timeout 120000ms

The assertion is at test_key_scopes.py:1660. The Chromium variants pass.

Runs. It failed on macOS in scheduled run 42473165114 (f926f4fa7). #3985's diagnosis also saw it fail in two Linux push runs, where it had no owner. It reproduces on Linux. With uv run pytest --run-main "tests/browser/navigation/test_key_scopes.py::test_tab_at_a_control_scrolled_away_goes_on_in_the_column_the_pointer_is_in[firefox_browser-input]" it failed 3 of 4 runs on main 2f47830e4 and 3 of 3 at 62cb54fc8 (Nov 6).

Not yet done. The onset is older than 62cb54fc8 and hasn't been bisected. It fails often enough locally that a git bisect run with about three runs per commit should find it. Then read the introducing change per Reading a red suite (.claude/skills/running-tend/SKILL.md): either the Tab route no longer follows the pointer's column in Firefox, or the test presses Tab before the page has read where the pointer is.

Cause of a failure tracked in #4225.

Activity

  1. added
    tend-ci-cause
    on Nov 9, 2026
  2. leaf-agent commented on Nov 9, 2026

    @leaf-agent
    CollaboratorAuthor

    The test set itself up wrongly in Firefox; the runtime is behaving correctly. Firefox scrolls a text field it has just focused to its caret after focus() returns. The test's immediate scrollTo was undone, and scrollY read 80 instead of 2400 at Tab. The pointer then moved below the window, Leaf recorded no pointer position, and Tab went on from the left column. That explains why only the input variant fails, and only in Firefox. #5767 makes the test wait for a render between focusing and scrolling, and does the same in the sibling textarea test, which had the same masked pattern. Locally the Firefox case went from 3 of 3 failures to 6 of 6 passes. The PR closes this issue and #5729, the same failure seen from the push runs. Its CI and landing are with tend-land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions