Skip to content

Fix intuitive propagation behavior#52

Open
zach-capalbo wants to merge 5 commits into
asvd:masterfrom
zach-capalbo:master
Open

Fix intuitive propagation behavior#52
zach-capalbo wants to merge 5 commits into
asvd:masterfrom
zach-capalbo:master

Conversation

@zach-capalbo

Copy link
Copy Markdown
  • 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

Metis77 commented Aug 7, 2019

Copy link
Copy Markdown

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

@laurenwithcats

Copy link
Copy Markdown

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
Copy Markdown

+1 for the works really well!
SHOULD MERGE!

@xandeadx

xandeadx commented Dec 8, 2023

Copy link
Copy Markdown

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