diff --git a/src/components/chart/ha-chart-base.ts b/src/components/chart/ha-chart-base.ts index ea720e16bc..aa4a90fef8 100644 --- a/src/components/chart/ha-chart-base.ts +++ b/src/components/chart/ha-chart-base.ts @@ -438,7 +438,10 @@ export class HaChartBase extends LitElement { color: white; border-radius: 4px; pointer-events: none; - z-index: 1000; + z-index: 1; + -ms-user-select: none; + -webkit-user-select: none; + -moz-user-select: none; width: 200px; box-sizing: border-box; direction: var(--direction); diff --git a/src/components/chart/state-history-chart-line.ts b/src/components/chart/state-history-chart-line.ts index 78ec773719..5f6286ecef 100644 --- a/src/components/chart/state-history-chart-line.ts +++ b/src/components/chart/state-history-chart-line.ts @@ -220,7 +220,12 @@ export class StateHistoryChartLine extends LitElement { // @ts-expect-error locale: numberFormatToLocale(this.hass.locale), onClick: (e: any) => { - if (!this.clickForMoreInfo) { + if ( + !this.clickForMoreInfo || + !(e.native instanceof MouseEvent) || + (e.native instanceof PointerEvent && + e.native.pointerType !== "mouse") + ) { return; } diff --git a/src/components/chart/state-history-chart-timeline.ts b/src/components/chart/state-history-chart-timeline.ts index 79b51be40e..8bfb0fef8b 100644 --- a/src/components/chart/state-history-chart-timeline.ts +++ b/src/components/chart/state-history-chart-timeline.ts @@ -224,7 +224,11 @@ export class StateHistoryChartTimeline extends LitElement { // @ts-expect-error locale: numberFormatToLocale(this.hass.locale), onClick: (e: any) => { - if (!this.clickForMoreInfo) { + if ( + !this.clickForMoreInfo || + !(e.native instanceof MouseEvent) || + (e.native instanceof PointerEvent && e.native.pointerType !== "mouse") + ) { return; }