From 548c69e0743725885d039f8f2f387c7737886692 Mon Sep 17 00:00:00 2001 From: Barbara Valdez <34872381+barbaravaldez@users.noreply.github.com> Date: Fri, 3 Apr 2020 14:25:51 -0700 Subject: [PATCH] Fix offset when scrolling to section (#9847) --- .../workbench/contrib/notebook/browser/notebook.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/workbench/contrib/notebook/browser/notebook.component.ts b/src/sql/workbench/contrib/notebook/browser/notebook.component.ts index f76429eb05..916bfbdec3 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebook.component.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebook.component.ts @@ -669,7 +669,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe let section = find(this.getSectionElements(), s => s.relativeUri && s.relativeUri.toLowerCase() === id); if (section) { // 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; (this.container.nativeElement).scrollTo({ top: scrollTop, behavior: 'smooth'