add scroll pos
This commit is contained in:
parent
d7cdbe14d3
commit
9fc6852e48
1 changed files with 1 additions and 1 deletions
2
drag.js
2
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;
|
||||
|
|
Loading…
Reference in a new issue