From 9fc6852e48f5941b1ce50e2b2524b30d648fa5e8 Mon Sep 17 00:00:00 2001 From: PossiblyAxolotl Date: Thu, 15 Aug 2024 17:09:13 -0600 Subject: [PATCH] add scroll pos --- drag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drag.js b/drag.js index d9b8730..5a2be87 100644 --- a/drag.js +++ b/drag.js @@ -123,7 +123,7 @@ function createWindow(url, title, width, height) { win.innerHTML += frame; win.style.left = ((window.innerWidth / 2) - (Number(width.replace("px","")) / 2)) + "px"; - win.style.top = ((window.innerHeight / 2) - (Number(height.replace("px","")) / 2)) + "px"; + win.style.top = ((window.innerHeight / 2) - (Number(height.replace("px","")) / 2) + window.scrollY) + "px"; zIndex ++; win.style.zIndex = zIndex;