You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you start selecting and scroll down by mouse wheel, elements on the top getting deselected
2023-08-16.12.59.21.mov
What is the current behavior?
Already selected items became deselected
Please provide the steps to reproduce and create a CodeSandbox.
Select some items
Don't stop selection and scroll down
Stop selection and scroll back to the top
Observe your previously selected items
What is the expected behavior?
Already selected items must be kept as selected
Your environment:
Toolset (e.g. webpack, vite, vue-cli...): webpack ^5.76.0 (Also reproducible on demos)
Version (@viselect/vanilla). ^3.2.4. Also reproducible on latest version and on demos
Browser: Safari 16.5
OS: macOS Ventura 13.4
Also, I want to admit, that I've spent some time to figure out solution for this problem. Reason why it happens is this line. Library expects that wheel event will be bubbled to the document. And it works fine for Chrome, but not for Safari. Seems like Safari doesn't bubble up this event by default. Simplest solution for my project was adding additional wheel event listener for my scrollable block. scrollableBlock.addEventListener('wheel', () => {})
In that case wheel event will be bubbled up to document and everything is ok.
The text was updated successfully, but these errors were encountered:
What is the problem?
If you start selecting and scroll down by mouse wheel, elements on the top getting deselected
2023-08-16.12.59.21.mov
What is the current behavior?
Already selected items became deselected
Please provide the steps to reproduce and create a CodeSandbox.
What is the expected behavior?
Already selected items must be kept as selected
Your environment:
Also, I want to admit, that I've spent some time to figure out solution for this problem. Reason why it happens is this line. Library expects that
wheel
event will be bubbled to thedocument
. And it works fine for Chrome, but not for Safari. Seems like Safari doesn't bubble up this event by default. Simplest solution for my project was adding additionalwheel
event listener for my scrollable block.scrollableBlock.addEventListener('wheel', () => {})
In that case
wheel
event will be bubbled up todocument
and everything is ok.The text was updated successfully, but these errors were encountered: