From ac18c6c018039566e69e549b64ff53b458999e14 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Thu, 27 Feb 2025 13:08:16 +0100 Subject: [PATCH] Fix select box radio click on firefox (#24422) --- src/components/ha-select-box.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/ha-select-box.ts b/src/components/ha-select-box.ts index 61fdb3533f..a53506df74 100644 --- a/src/components/ha-select-box.ts +++ b/src/components/ha-select-box.ts @@ -7,6 +7,7 @@ import type { HaRadio } from "./ha-radio"; import { fireEvent } from "../common/dom/fire_event"; import type { HomeAssistant } from "../types"; import { computeRTL } from "../common/util/compute_rtl"; +import { stopPropagation } from "../common/dom/stop_propagation"; interface SelectBoxOptionImage { src: string; @@ -76,6 +77,7 @@ export class HaSelectBox extends LitElement { .value=${option.value} .disabled=${disabled} @change=${this._radioChanged} + @click=${stopPropagation} >
${option.label} @@ -99,6 +101,7 @@ export class HaSelectBox extends LitElement { } private _radioChanged(ev: CustomEvent) { + ev.stopPropagation(); const radio = ev.currentTarget as HaRadio; const value = radio.value; if (this.disabled || value === undefined || value === (this.value ?? "")) {