From 8a9ee104ff5134c28cc551a439a2501afc9dd8f4 Mon Sep 17 00:00:00 2001 From: s72785 Date: Tue, 21 Jul 2015 14:33:37 +0200 Subject: [PATCH] adding focus on input with id 'crement' if available in view --- static/js/barcode.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/barcode.js b/static/js/barcode.js index 0daad22..63c6433 100644 --- a/static/js/barcode.js +++ b/static/js/barcode.js @@ -10,6 +10,10 @@ function showBarcode(text) { function barcodeKeyPress(event) { var key = String.fromCharCode(event.charCode) + var input = document.getElementById('crement') + if ( input ) { + input.focus() + } var focused = document.activeElement if (! focused || focused == document.body) { focused = null