dragscroll
dragscroll copied to clipboard
Fix intuitive propagation behavior
- 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
- Useful if you have
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.
this works perfectly for me. I suggest to merge this.
This worked really well as a fix on a sliding navigation bar, where navigation clicks were being incorrectly detected as drags in some cases.
+1 for the works really well! SHOULD MERGE!
Worked