Skip to content

Commit

Permalink
Merge pull request #174 from eeditiones/highlight
Browse files Browse the repository at this point in the history
Minor changes in pb-highlight concerning `scroll` property
  • Loading branch information
wolfgangmm authored May 2, 2024
2 parents 02a74b5 + dfe1881 commit 2f9fb87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pb-highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 2f9fb87

Please sign in to comment.