Commit c7f8a98b by Félicie

press enter added

parent 78f6aa31
Pipeline #1641 failed with stage
in 1 minute 27 seconds
...@@ -1605,12 +1605,6 @@ function display_products(params) { ...@@ -1605,12 +1605,6 @@ function display_products(params) {
// Since data change is saved on blur, set focus on change in case of arrows pressed // Since data change is saved on blur, set focus on change in case of arrows pressed
$(this).focus(); $(this).focus();
}) })
.on('keypress', 'tbody td .product_qty_input', function(e) {
// Validate on Enter pressed
if (e.which == 13) {
$(this).blur();
}
})
.on('keydown', 'tbody td .product_qty_input', function(e) { .on('keydown', 'tbody td .product_qty_input', function(e) {
if (e.which == 38) { if (e.which == 38) {
e.preventDefault(); e.preventDefault();
...@@ -1631,7 +1625,7 @@ function display_products(params) { ...@@ -1631,7 +1625,7 @@ function display_products(params) {
top: $(window).scrollTop() - $("#suppliers_container").outerHeight() top: $(window).scrollTop() - $("#suppliers_container").outerHeight()
}); });
} }
} else if (e.which == 40) { } else if (e.which == 13, 40) {
e.preventDefault(); e.preventDefault();
// On arrow down pressed, focus previous row input // On arrow down pressed, focus previous row input
......
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