diff --git a/src/components/ha-control-slider.ts b/src/components/ha-control-slider.ts index 23014308d0..290e061ae3 100644 --- a/src/components/ha-control-slider.ts +++ b/src/components/ha-control-slider.ts @@ -67,6 +67,9 @@ export class HaControlSlider extends LitElement { @property({ attribute: "tooltip-mode" }) public tooltipMode: TooltipMode = "interaction"; + @property({ attribute: "touch-action" }) + public touchAction?: string; + @property({ type: Number }) public value?: number; @@ -152,7 +155,7 @@ export class HaControlSlider extends LitElement { setupListeners() { if (this.slider && !this._mc) { this._mc = new Manager(this.slider, { - touchAction: this.vertical ? "pan-x" : "pan-y", + touchAction: this.touchAction ?? (this.vertical ? "pan-x" : "pan-y"), }); this._mc.add( new Pan({ diff --git a/src/components/ha-control-switch.ts b/src/components/ha-control-switch.ts index 2626b2ea20..0e75b66549 100644 --- a/src/components/ha-control-switch.ts +++ b/src/components/ha-control-switch.ts @@ -33,6 +33,9 @@ export class HaControlSwitch extends LitElement { // SVG icon path (if you need a non SVG icon instead, use the provided off icon slot to pass an in) @property({ type: String }) pathOff?: string; + @property({ attribute: "touch-action" }) + public touchAction?: string; + private _mc?: HammerManager; protected firstUpdated(changedProperties: PropertyValues): void { @@ -73,7 +76,7 @@ export class HaControlSwitch extends LitElement { setupListeners() { if (this.switch && !this._mc) { this._mc = new Manager(this.switch, { - touchAction: this.vertical ? "pan-x" : "pan-y", + touchAction: this.touchAction ?? (this.vertical ? "pan-x" : "pan-y"), }); this._mc.add( new Swipe({ diff --git a/src/dialogs/more-info/components/lights/light-color-temp-picker.ts b/src/dialogs/more-info/components/lights/light-color-temp-picker.ts index a1f5726cac..7c300193e0 100644 --- a/src/dialogs/more-info/components/lights/light-color-temp-picker.ts +++ b/src/dialogs/more-info/components/lights/light-color-temp-picker.ts @@ -78,6 +78,7 @@ class LightColorTempPicker extends LitElement { return html`