Skip to content

[Bug report] Links with anchors don't scroll to the correct position *the first time* #1533

Open
@smirnoffmv

Description

@smirnoffmv

Description

When I open the anchor link and the page content is too big, it doesn't scroll to the end! If you go back and click on the same link again, it works fine.

When I click on the anchor link for the first time, I get to the wrong place. In the wrong place at all

bug1

bug2

If I click on the back arrow in the browser and click on the same link again, I will already get there correct. Apparently the page has already loaded for the second time

bug3

A similar problem has already been discussed here, and apparently has not been solved: vuejs/vuepress#1499

Reproduction

https://help.stack-it.ru/web/ul/160_web_tk_ul_raschotd-master/130_web_tk_ul_energy/4_wk_diff_tar.html#расчет-точек-учета-ику-в-договорах-на-ресурс

Used Package Manager

npm

System Info

Environment Info:

  System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12400
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 10.4.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Chromium (123.0.2420.65)
  npmPackages:
    @vuepress/core:  2.0.0-rc.7
    @vuepress/theme-default: Not Found
    vuepress: ^2.0.0-rc.7 => 2.0.0-rc.7
  npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions