mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Fix offset when scrolling to section (#9847)
This commit is contained in:
@@ -669,7 +669,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
|
|||||||
let section = find(this.getSectionElements(), s => s.relativeUri && s.relativeUri.toLowerCase() === id);
|
let section = find(this.getSectionElements(), s => s.relativeUri && s.relativeUri.toLowerCase() === id);
|
||||||
if (section) {
|
if (section) {
|
||||||
// Scroll this section to the top of the header instead of just bringing header into view.
|
// Scroll this section to the top of the header instead of just bringing header into view.
|
||||||
let scrollTop = jQuery(section.headerEl).offset().top;
|
let scrollTop = section.headerEl.offsetTop;
|
||||||
(<HTMLElement>this.container.nativeElement).scrollTo({
|
(<HTMLElement>this.container.nativeElement).scrollTo({
|
||||||
top: scrollTop,
|
top: scrollTop,
|
||||||
behavior: 'smooth'
|
behavior: 'smooth'
|
||||||
|
|||||||
Reference in New Issue
Block a user