Esc can be used to close log box. Log box close button scrolls down in fixed position

This commit is contained in:
Daniel Xie 2017-06-17 13:19:37 -05:00
parent 8da64c750c
commit 9a96f6b231
2 changed files with 12 additions and 1 deletions

@ -38,8 +38,8 @@
.dialog-box-close-button,
#log-box-close {
color: #aaa;
float: right;
color: #aaa;
font-size: 20px;
font-weight: bold;
-webkit-border-radius: 12px;
@ -50,6 +50,11 @@
box-shadow: 1px 1px 3px #000;
}
#log-box-close {
position: fixed;
right: 27%;
}
.dialog-box-close-button:hover,
.dialog-box-close-button:focus,
#log-box-close:hover,

@ -11,6 +11,12 @@ $(document).click(function(event) {
});
*/
$(document).keydown(function(event) {
if (logBoxOpened && event.keyCode == 27) {
logBoxClose();
}
});
function logBoxInit() {
var closeButton = document.getElementById("log-box-close");
logBoxClose();