diff --git a/src/Views/Home/Inventory.cshtml b/src/Views/Home/Inventory.cshtml index 6ddd1da..1152948 100644 --- a/src/Views/Home/Inventory.cshtml +++ b/src/Views/Home/Inventory.cshtml @@ -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); }); }