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;