Skip to content

[BUG] position-try-fallbacks algorithm triggered more eagerly than spec #363

Description

@jamesnw

Describe the bug
In the spec and implementations, the position-try-fallbacks algorithm is only run when the currently applied fallback overflows. This differs from the polyfill, pre-release versions of Safari, and Floating UI, which falls back to the initial position as soon as possible.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://anchor-polyfill.netlify.app/#position-try
  2. Scroll to apply a fallback
  3. Polyfill: Scroll back slightly, and the target jumps back to the initial position immediately.
  4. Spec, implementations: Scroll back slightly, and the target does not return to the initial position.

Expected behavior
w3c/csswg-drafts#12682

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions