mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
sempre retorna o focus para input search em page balcao
This commit is contained in:
@@ -73,10 +73,10 @@
|
||||
<h2 style="text-align: center;">Buscar Produto </h2>
|
||||
<div class="grid-container">
|
||||
<input
|
||||
oninput="searchProduct()"
|
||||
type="text"
|
||||
id="search-product"
|
||||
name="search-product"
|
||||
type="text"
|
||||
oninput="searchProduct()"
|
||||
autofocus
|
||||
placeholder="Buscar Produto"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -91,6 +91,7 @@ function addProductBalcao() {
|
||||
const imprimir = document.getElementById('imprimirFichas')
|
||||
receber.removeAttribute('disabled');
|
||||
imprimir.removeAttribute('disabled');
|
||||
document.getElementById('search-product').focus()
|
||||
fieldQtd.value = 1;
|
||||
setTimeout(function() {
|
||||
updateTotal();}, 100);
|
||||
@@ -98,7 +99,6 @@ function addProductBalcao() {
|
||||
|
||||
|
||||
function removeProductBalcao(id) {
|
||||
|
||||
const url = `/balcao/removeProductBalcao${id}/`;
|
||||
fetch(url, {
|
||||
method: 'GET',
|
||||
@@ -110,10 +110,9 @@ function removeProductBalcao(id) {
|
||||
var listProductsBalcaoElement = document.getElementById("list-products-balcao");
|
||||
listProductsBalcaoElement.innerHTML = text;
|
||||
})
|
||||
|
||||
document.getElementById('search-product').focus()
|
||||
setTimeout(function() {
|
||||
updateTotal();}, 100);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -161,8 +160,11 @@ function addProductClick(productId, comandaId) {
|
||||
|
||||
const receber = document.getElementById('pagarComanda')
|
||||
const imprimir = document.getElementById('imprimirFichas')
|
||||
var search = document.getElementById('search-product')
|
||||
receber.removeAttribute('disabled');
|
||||
imprimir.removeAttribute('disabled');
|
||||
search.focus()
|
||||
// search.setAttribute('autofocus');
|
||||
fieldQtd.value = 1;
|
||||
|
||||
setTimeout(function() {
|
||||
|
||||
Reference in New Issue
Block a user