diff options
author | Florian <stayawake@lavabit.com> | 2014-02-16 00:58:49 +0100 |
---|---|---|
committer | Florian <stayawake@lavabit.com> | 2014-02-16 00:58:49 +0100 |
commit | 010549c41168b6f3d47f236c647c6246e3c809a6 (patch) | |
tree | fd678c66ef39b553f1e66cd7d9a9bdc460ef7054 | |
parent | 1adff22c4bd400991e22496f657746fb725fdbd1 (diff) |
bugfix: enter triggers hide form, after form display due to focus
-rw-r--r-- | cam.html | 2 | ||||
-rw-r--r-- | js/cctv-control.js | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -5,7 +5,7 @@ <script src="js/cctv-control.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="css/cam.css"> </head> -<body onkeydown="keyDown(event)"> +<body onkeydown="keyDown(event)" id='body'> <div id="screen"> <img src="img/testbild.gif" id="camImage"> </div> diff --git a/js/cctv-control.js b/js/cctv-control.js index 9f71276..b4e6fa7 100644 --- a/js/cctv-control.js +++ b/js/cctv-control.js @@ -153,7 +153,9 @@ function hideForm() { localStorage.setItem("formAnalysis2", document.getElementById('formAnalysis2').value); localStorage.setItem("formAnalysis3", document.getElementById('formAnalysis3').value); - //hide form + //hide form and unfocus button + //otherwise next enter press will trigger print-function + document.getElementById('printButton').blur(); window.open('print.html', 'Printlayout'); document.getElementById("form").style.visibility = 'hidden'; formActive = 0; |