@vdegenne/highlight-manager 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +1 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -175,7 +175,7 @@ export class HighLightManager {
175
175
  if (elementsToHighlight.length === 0) {
176
176
  return false;
177
177
  }
178
- if (this.#options.scrollWhenOffscreen ||
178
+ if (this.#options.scrollWhenOffscreen &&
179
179
  !isInViewport(elementsToHighlight[0])) {
180
180
  elementsToHighlight[0]?.scrollIntoView({
181
181
  behavior: 'smooth',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vdegenne/highlight-manager",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "helper to navigate/highlight elements in a page based on a css selector",
5
5
  "type": "module",
6
6
  "exports": {