Fix mouse wheel scroll-up not working
This is a bugfix commit. Scrolling with the mouse wheel only works downwards, but not upwards in the open selectric panel. This is because the condition to prevent scrolling up when we're already at the top takes the position from the wrong element and it always thinks it's scrolled all the way up, preventing any further scroll upwards. This commit fixes it by taking the scroll position from the correct element, the parent.
Codecov Report
Merging #210 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #210 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 391 391
=====================================
Hits 391 391
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/jquery.selectric.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 0b92c26...c2da720. Read the comment docs.
Thank you very much for you PR. I'll verify and test this in the next days.
The fix works for me. Thanks @pszoldan