Skip to content

Anchor scrolling only works first time it is clicked and not on subsequent clicks. #29099

@ImranAhmed

Description

@ImranAhmed

🐞 bug report

Affected Package

"@angular/router": "^7.2.5",

Description

In attached stackblitz.

  1. Click 'scroll to A'. Page correctly scrolls to anchor A.
  2. Scroll the browser window back to top of page.
  3. Click 'scroll to A'. Page does not correctly scroll to anchor A.

🔬 Minimal Reproduction

https://stackblitz.com/edit/angular-q641ci

🌍 Your Environment

"dependencies": {
"@angular/common": "^7.2.5",
"@angular/compiler": "^7.2.5",
"@angular/core": "^7.2.5",
"@angular/forms": "^7.2.5",
"@angular/platform-browser": "^7.2.5",
"@angular/platform-browser-dynamic": "^7.2.5",
"@angular/router": "^7.2.5",
"core-js": "^2.6.5",
"rxjs": "^6.4.0",
"zone.js": "^0.8.29"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions