Skip to content

Commit 527e112

Browse files
committed
Fixed positioning of Auditor element if it is dragged above or below the visible window area.
1 parent cd6364a commit 527e112

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Auditor/HTMLCSAuditor.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,14 @@ _global.HTMLCSAuditor = new function()
197197
};
198198

199199
_doc.onmouseup = function(e) {
200-
var maxHeight = window.innerHeight - e.clientHeight;
201-
202-
if (mouseX > maxHeight) {
200+
var maxHeight = window.innerHeight - wrapper.offsetHeight;
201+
202+
if (mouseY > maxHeight) {
203203
wrapper.style.top = maxHeight + 'px';
204-
} else if (mouseX < 0) {
204+
} else if (mouseY < 0) {
205205
wrapper.style.top = 0 + 'px';
206206
}
207-
207+
208208
dragging = false;
209209
};
210210

0 commit comments

Comments
 (0)