Skip to content

Unexpect scrollBehavior about savedPosition in Safari and Firefox #1431

Open
@abitwhy

Description

@abitwhy

Version

4.0.15

Reproduction link

codesandbox.io

Steps to reproduce

  1. Open the minimal reproduction in firefox.
  2. Click the header1.
  3. Click the header2.
  4. Click the header1 agin.
  5. Click the header2 agin.

It also happened in chrome, if you scroll page to the end before click anchor link in step5.

What is expected?

Jump to the correct header.

What is actually happening?

Jump to savedPostion.


It meets code logic, but does not meet the expectations of use.

Notice: I have used CSS scroll-behavior in :root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    browser quirkSpecific to a browserbugSomething isn't workinghas workaroundA workaround has been found to deal with the issue

    Type

    No type

    Projects

    Status

    📆 Planned

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions