mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-04 22:39:36 +00:00
Correctly dispatch the input event of non-printable char controller from the barcode scan controller
This commit is contained in:
parent
f3dab36bbe
commit
a8f9f9832e
1 changed files with 5 additions and 1 deletions
|
|
@ -114,7 +114,11 @@ export default class extends Controller {
|
||||||
// Mark as handled immediately (prevents spam even if callback fires repeatedly)
|
// Mark as handled immediately (prevents spam even if callback fires repeatedly)
|
||||||
this._lastDecodedText = normalized;
|
this._lastDecodedText = normalized;
|
||||||
|
|
||||||
document.getElementById('scan_dialog_input').value = decodedText;
|
const input = document.getElementById('scan_dialog_input');
|
||||||
|
input.value = decodedText;
|
||||||
|
//Trigger nonprintable char input controller to update the hidden input value
|
||||||
|
input.dispatchEvent(new Event('input', { bubbles: true }));
|
||||||
|
|
||||||
//Submit form
|
//Submit form
|
||||||
document.getElementById('scan_dialog_form').requestSubmit();
|
document.getElementById('scan_dialog_form').requestSubmit();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue