fix(aio): fix scrolling to top (#17102)
Previously, the `#top-of-page` element (used when scrolling to top) was placed inside the content section (which at the time had zero top margin and padding). Furthermore, there was a top offset applied when scrolling that took the static top bar's height into account. Since now the top bar is not static any more and the content section has a non-zero top padding, scrolling to top does not work as expected. This commit fixes this by: - Moving the `#top-of-page` element to the top of the `aio-shell`. - Stop accounting for the top bar's top. Fixes #17006
Showing
- aio/e2e/app.e2e-spec.ts 20 additions, 0 deletionsaio/e2e/app.e2e-spec.ts
- aio/e2e/app.po.ts 8 additions, 0 deletionsaio/e2e/app.po.ts
- aio/src/app/app.component.html 2 additions, 1 deletionaio/src/app/app.component.html
- aio/src/app/shared/scroll.service.spec.ts 0 additions, 1 deletionaio/src/app/shared/scroll.service.spec.ts
- aio/src/app/shared/scroll.service.ts 4 additions, 3 deletionsaio/src/app/shared/scroll.service.ts
- aio/src/app/shared/toc.service.spec.ts 5 additions, 0 deletionsaio/src/app/shared/toc.service.spec.ts
Please register or sign in to comment