diff --git a/extensions/markdown-language-features/preview-src/scroll-sync.ts b/extensions/markdown-language-features/preview-src/scroll-sync.ts index d6a18685187..33d81094cb5 100644 --- a/extensions/markdown-language-features/preview-src/scroll-sync.ts +++ b/extensions/markdown-language-features/preview-src/scroll-sync.ts @@ -30,7 +30,7 @@ export class CodeLineElement { } const bounds = this.element.getBoundingClientRect(); - if (bounds.height === 0 && bounds.width === 0) { + if (bounds.height === 0 || bounds.width === 0) { return false; }