Skip to content

[Bug]: dropdown is scrolled into view even though it's already fully visible #38494

@AdamOakman

Description

@AdamOakman

🚀 Feature Request

As documented in here:

https://playwright.dev/docs/actionability#stable

it would be beneficial to expose 'stable' state as additional option in Locator.waitFor.

At the moment the only way to make sure element is not animating is implicit actionability check execution as part of actions involving clicking/tapping. Implicit actionability checks includes scrolling element into view.

Example

waitFor(options?: {
   // ...
    state?: "attached"|"detached"|"visible"|"hidden"|"stable";
   // ...
  }): Promise<void>;

Motivation

In very specific cases scrolling an element which is still animating closes it (some custom dropdowns might be implement like that). Therefore having a way to have this check performed alone would save headaches and custom stability checks implementation.

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