From 0707a217cb1356f1f893746fb39d3007dcdad934 Mon Sep 17 00:00:00 2001 From: Sahib Bhai Date: Tue, 19 Nov 2024 12:35:54 -0800 Subject: [PATCH] Add event listener to prevent focus propagation on MultiSelect dropdown --- assets/javascript/custom.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 assets/javascript/custom.js diff --git a/assets/javascript/custom.js b/assets/javascript/custom.js new file mode 100644 index 00000000..9e422992 --- /dev/null +++ b/assets/javascript/custom.js @@ -0,0 +1,9 @@ +document.addEventListener('DOMContentLoaded', function() { + const multiSelectDropdown = document.querySelector('.mantine-MultiSelect-dropdown'); + if (multiSelectDropdown) { + multiSelectDropdown.addEventListener('focus', function(event) { + event.preventDefault(); + event.stopPropagation(); + }); + } +}); \ No newline at end of file