Skip to content

Conversation

zach-capalbo
Copy link

  • Add small threshold to begin dragging
  • Don't propagate clicks to scrolled element after movement has reached threshold
    • Useful if you are scrolling something with lots of links or buttons in it
  • Don't propagate mousedown events
    • Useful if you have .dragscrolls embedded in other .dragscrolls

These changes break current behavior, and add a few more bytes, but it makes the behavior a lot more intuitive to me. Creating the pull request in case it seems more intuitive to anyone else.

- Add small threshold to begin dragging
- Don't propagate clicks to scrolled element after movement has reached threshold
  - Useful if you are scrolling something with lots of links or buttons in it
- Don't propagate `mousedown` events
  - Useful if you have `.dragscroll`s embedded in other `.dragscroll`s
@Metis77
Copy link

Metis77 commented Aug 7, 2019

this works perfectly for me.
I suggest to merge this.

@laurenwithcats
Copy link

This worked really well as a fix on a sliding navigation bar, where navigation clicks were being incorrectly detected as drags in some cases.

@jonasgoddeeris
Copy link

+1 for the works really well!
SHOULD MERGE!

@xandeadx
Copy link

xandeadx commented Dec 8, 2023

Worked

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.

5 participants