From 142120753f463a0523d02c69b7114c8df699b257 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 3 Sep 2021 16:41:15 +0200 Subject: [PATCH] DEV: prevents focus event bubbling (#14241) --- .../addon/components/select-kit/single-select-header.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit/single-select-header.js b/app/assets/javascripts/select-kit/addon/components/select-kit/single-select-header.js index 168e5b9e867..de669cd10b5 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit/single-select-header.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit/single-select-header.js @@ -11,6 +11,8 @@ export default SelectKitHeaderComponent.extend(UtilsMixin, { attributeBindings: ["name"], focusIn(event) { + event.stopImmediatePropagation(); + document.querySelectorAll(".select-kit-header").forEach((header) => { if (header !== event.target) { header.parentNode.open = false;