diff --git a/src/pb-highlight.js b/src/pb-highlight.js index c3b02209..b20e5787 100644 --- a/src/pb-highlight.js +++ b/src/pb-highlight.js @@ -133,8 +133,8 @@ export class PbHighlight extends pbMixin(LitElement) { _highlightOn(ev) { if (ev.detail.source != this && ev.detail.id === this.key) { this._className = 'highlight-on'; - if (ev.detail.scroll) { - this.scrollIntoView({ behaviour: 'smooth' }); + if (ev.detail.scroll && this.disabled == false) { + this.scrollIntoView({ block: "center", behaviour: 'smooth' }); } if (this.duration > 0) { setTimeout(function () {