Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not fire hold if a scroll is made #843

Merged

Conversation

brunosabot
Copy link
Contributor

@brunosabot brunosabot commented Oct 8, 2024

Context:
Hold action is fired too fast and prevent the scroll

What did I do:

  • I change the delay to 500ms to be consistent with Home Assistant hold delay
  • I reset the timer on scroll

@brunosabot brunosabot force-pushed the fix/hold-is-triggering-when-scrolling branch from 875793e to 72f8679 Compare October 8, 2024 20:09
@Clooos
Copy link
Owner

Clooos commented Oct 9, 2024

My man!

@Clooos Clooos merged commit 2707d9e into Clooos:main Oct 12, 2024
1 check passed
@michaelarnauts
Copy link

It still has an issue, when scrolling down, but the viewport is already at the bottom (or scrolling up at the top), the click is still triggered.

@michaelarnauts
Copy link

Maybe a better way could be to remember the X/y coordinates of the initial hold, and if they are still the same after the timeout and we are still holding, we know we didn't scroll but a hold action is performed?

Although I'm wondering if there isn't a standard way to do this.

Clooos added a commit that referenced this pull request Oct 22, 2024
- [x] Separator line background color global variable
- [x] Select card and select sub-buttons now supports attribute lists for climate, light and media player entities (I maybe forgot to add some, please open an issue if you want one that is missing) #665
- [x] New media player blurred background option
- [x] New experimental climate card (but should works flawlessly) #398
- [x] Added a toggle in the sub-buttons editor for disabling the background color based on entity state
- [x] The back button issue should be fixed in all cases #856
- [x] Fixed the sliders that where not working anymore #849 #838
- [x] Fan sliders are now set to 0 when off
- [x] Slider with climate expected float #768
- [x] Do not fire hold if a scroll is made #843 by @brunosabot
- [x] Minor CSS fixes
- [x] Some various minor fixes
- [x] Some various optimizations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants