From 5e627e14ae65887959a2e8ca662445584c4d415d Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Wed, 8 Oct 2025 11:46:43 +0700 Subject: [PATCH] `window.scrollX` and `window.scrollY` --- hotline.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hotline.mjs b/hotline.mjs index c6d0769..70e5e6d 100644 --- a/hotline.mjs +++ b/hotline.mjs @@ -566,9 +566,9 @@ export class hotline { if ( (instance.vertical && - Math.round(instance.#first.end) < instance.#shell.offsetTop + instance.#shell.offsetParent.offsetTop) || + Math.round(instance.#first.end) < instance.#shell.offsetTop + instance.#shell.offsetParent.offsetTop - window.scrollY) || (!instance.vertical && - Math.round(instance.#first.end) < instance.#shell.offsetLeft + instance.#shell.offsetParent.offsetLeft) + Math.round(instance.#first.end) < instance.#shell.offsetLeft + instance.#shell.offsetParent.offsetLeft - window.scrollX) ) { // The first element with its separator went beyond the shell @@ -626,9 +626,9 @@ export class hotline { } } else if ( (instance.vertical && - Math.round(instance.#first.rectangle.y) > instance.#shell.offsetTop + instance.#shell.offsetParent.offsetTop) || + Math.round(instance.#first.rectangle.y) > instance.#shell.offsetTop + instance.#shell.offsetParent.offsetTop - window.scrollY) || (!instance.vertical && - Math.round(instance.#first.rectangle.x) > instance.#shell.offsetLeft + instance.#shell.offsetParent.offsetLeft) + Math.round(instance.#first.rectangle.x) > instance.#shell.offsetLeft + instance.#shell.offsetParent.offsetLeft - window.scrollX) ) { // Beginning border of first element with its separator went beyond the shell