Skip to content

visibilityState no longer works with concurrency>1 after chrome 120 #2808

Open
@frankborden

Description

@frankborden

We have some code that uses visibilityState for reporting etc.
When we upgraded our tests from Chrome 120 to 128/129, they started to fail and timeout, showing visibilityState surprisingly becomes "hidden" and likewise our focus/blur event get stopped causing additional failures.
We found that forcing serial tests fixed this issue, but of course we would prefer to keep the concurrency for speed.

I made a simple reproduction with code like this in a click handler:

if (document.visibilityState === "visible") {
  this.count++;
}

and some tests that click the button and assert the count increase. The tests only pass with concurrency=1, but it used to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions