Skip to content

Panning on slider causes updates based on initial pointerdown position #1146

@controlaltnerd

Description

@controlaltnerd

When panning on a slider to adjust the value of an entity, a user's initial tap/click (pointerdown event) may occur on a part of the slider other than where the current value is represented. In this scenario, the slider's first update to an entity is the value at that position, often causing unintended effects such as the brightness of a light suddenly jumping from a low value to a very high value when the user intended to simply adjust it by a small amount.

Steps to reproduce the behavior:

  1. Create a slider and attach it to an entity such as a dimmable light
  2. Set the slider to a low value, such as 20% of the way across the element
  3. Tap/click on a high value on the slider with the intent to slide to adjust

Expected behavior
Panning on a slider from any position should update the entity's value relative to the pre-interaction value. E.g., if the slider is at 20% pre-interaction, and a user starts the pan interaction at 50% and slides to 55%, the slider should move from 20% to 25%.

I currently don't have the tools to record this, but it should be easy to reproduce on both desktop and mobile. I have an idea for a fix, but this probably warrants some discussion on expected behavior before implementing.

Information:

  • OS: iOS, MacOS
  • Browser/App: Safari, Chrome
  • Bubble Card version: 2.3.0
  • Home Assistant version: 2024.12.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions