Commit 50f4f29a by Damien Moulard

INV: fix input focus when product scanned

parent 707b2289
Pipeline #2294 passed with stage
in 1 minute 26 seconds
...@@ -285,8 +285,7 @@ function edit_event(clicked) { ...@@ -285,8 +285,7 @@ function edit_event(clicked) {
* If qty is not null, it comes from barcode reading result * If qty is not null, it comes from barcode reading result
* */ * */
function setLineEdition(item, qty) { function setLineEdition(item, qty) {
var edition_input = $('#edition_input'), var edition_input = $('#edition_input');
set_focus = true;
editing_item = item; editing_item = item;
$('#product_name').text(editing_item.name); $('#product_name').text(editing_item.name);
...@@ -308,14 +307,13 @@ function setLineEdition(item, qty) { ...@@ -308,14 +307,13 @@ function setLineEdition(item, qty) {
*/ */
editing_item.qty = qty; editing_item.qty = qty;
edition_input.val(qty); edition_input.val(qty);
set_focus = false;
} }
// If item is reprocessed, set input with value // If item is reprocessed, set input with value
if (editing_origin == 'processed') { if (editing_origin == 'processed') {
edition_input.val(editing_item.qty); edition_input.val(editing_item.qty);
} }
if (set_focus === true)
edition_input.focus(); edition_input.focus();
// Make edition area blink when edition button clicked // Make edition area blink when edition button clicked
container_edition.classList.add('blink_me'); container_edition.classList.add('blink_me');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment