From 69f33b732cbb164811feb3070941cce258d4e733 Mon Sep 17 00:00:00 2001 From: James Lucas Date: Mon, 1 Jul 2024 12:24:26 +1000 Subject: [PATCH] fix: remove label's for attribute when we wrap the input with the label for kc-toggle --- src/js/control/select.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/control/select.js b/src/js/control/select.js index 9de4191f1..163fa98ae 100644 --- a/src/js/control/select.js +++ b/src/js/control/select.js @@ -93,6 +93,7 @@ export default class controlSelect extends control { const labelAttrs = { for: optionAttrs.id } let output = [input, this.markup('label', labelContents, labelAttrs)] if (toggle) { + delete labelAttrs.for labelAttrs.className = 'kc-toggle' labelContents.unshift(input, this.markup('span')) output = this.markup('label', labelContents, labelAttrs)