Fixed camera still running when manually entering asset after activating barcode scanner

This commit is contained in:
2025-10-26 16:37:00 +01:00
parent c1c12384f5
commit 188ace283b

View File

@@ -210,6 +210,14 @@
const assetIdManuallyButton = document.querySelector('#enterAssetIdManuallyButton');
if (assetIdManuallyButton) {
assetIdManuallyButton.addEventListener('click', async () => {
if (html5QrCode) {
try {
await html5QrCode.stop();
document.getElementById("reader").style.display = "none";
} catch (err) {
console.warn("Could not stop scanner:", err);
}
}
await onScanSuccess(document.getElementById("barcodeInput").value, null);
});
}