mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +03:00
fix: sidebar navigation issues when scrollYOffset is float number
fixes #748
This commit is contained in:
parent
02f6e1820b
commit
c04f387378
|
@ -66,7 +66,8 @@ export class ScrollService {
|
|||
}
|
||||
element.scrollIntoView();
|
||||
if (this._scrollParent && this._scrollParent.scrollBy) {
|
||||
(this._scrollParent.scrollBy as any)(0, -this.options.scrollYOffset());
|
||||
// adding 1 account rounding errors in case scrollYOffset is float-number
|
||||
(this._scrollParent.scrollBy as any)(0, -this.options.scrollYOffset() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user