From 6abff69bcb0e429158b037ecb2977097d12dac71 Mon Sep 17 00:00:00 2001 From: James Chapman Date: Thu, 11 Jul 2024 21:07:04 +0100 Subject: [PATCH] Fix transaction item modal closing when scanning barcode --- Groceries/wwwroot/js/controllers/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Groceries/wwwroot/js/controllers/modal.js b/Groceries/wwwroot/js/controllers/modal.js index be2d81a..2e55bbe 100644 --- a/Groceries/wwwroot/js/controllers/modal.js +++ b/Groceries/wwwroot/js/controllers/modal.js @@ -13,7 +13,7 @@ export default class ModalController extends Controller { if (!this.element.open) { return; } - if (event.type === "turbo:submit-end" && (event.detail.formSubmission.method === 0 || !event.detail.success)) { + if (event.type === "turbo:submit-end" && (event.detail.formSubmission.method === "get" || !event.detail.success)) { // Don't close modal if form method was GET or submission failed return; }