Thanks to visit codestin.com
Credit goes to github.com

Skip to content

links with anchors don't scroll to the correct position *the first time* #1499

@koskimas

Description

@koskimas
  • I confirm that this is an issue rather than a question.

First of all, thank you so much for this awesome project and all the hard work you've put into it.

Bug report

Anchors in links to other pages within a vuepress site don't work the first time the link is clicked. "Don't work" means that the page is not scrolled to the element, but the sidebar does have correct item highlighted. Once the page is loaded the first time, any consecutive clicks through the link to that page do work as expected.

Version

1.0.0-alpha.46

Steps to reproduce

Go to this this address http://vincit.github.io/objection.js/new-docs/guide/getting-started.html

Click the second link (Model.knex(knex)).

  • First time you do that: it goes to the correct page, highlights the correct item in the sidebar, but does not scroll to the correct place.

  • Consecutive clicks: Everything works.

The code of that site can be found here

What is expected?

Links with anchors should work even when clikcing them the first time during a session.

What is actually happening?

Links with anchors don't scroll to the correct position the first time they are used.

Other relevant information

I know that I'm reporting a bug for an alpha version, but this bug existed also in all 0.X versions I tried, so I think there's something fundamental about this bug. Or I'm doing something colossally wrong.

  • Your OS: Linux
  • Node.js version: 10
  • Browser version: Chrome 73
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm
  • Does this issue occur when all plugins are disabled? yes

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