Skip to content

Commit

Permalink
Update previewbox.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bombasticSlacks committed Dec 14, 2023
1 parent 56ad21b commit 9737737
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Game/assets/js/previewbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1141,8 +1141,8 @@ var previewbox = (function () {

// This is important. It prevents the preview box from being redrawn repeatedly while onmouseover
_rmEvent(a, "mouseover", _a_openPreviewPC);
_rmEvent(Document, "keydown", _a_openPreviewPC);
_addEvent(Document, "keyup", _a_closePreviewPC);
window.removeEventListener("keydown", _a_openPreviewPC);
window.addEventListener("keyup", _a_closePreviewPC);
_showBoxPC(a, e.clientX, e.clientY);

break;
Expand All @@ -1152,7 +1152,7 @@ var previewbox = (function () {
break;
}
} else {
_addEvent(Document, "keydown", _a_openPreviewPC);
window.addEventListener("keydown", _a_openPreviewPC);
}
}
},
Expand All @@ -1164,7 +1164,7 @@ var previewbox = (function () {
e = _normalizeEvent(e);

if( !e.ctrlKey ){
_rmEvent(Document, "keyup", _a_closePreviewPC);
window.addEventListener("keyup", _a_closePreviewPC);
_addEvent(a, "mouseover", _a_openPreviewPC);
_hideBoxPC();
}
Expand Down

0 comments on commit 9737737

Please sign in to comment.