captbaritone / webamp

Winamp 2 reimplemented for the browser
https://webamp.org
MIT License
9.7k stars 640 forks source link

Scrolling on main window & playlist is too fast #1225

Open milkmuffin opened 11 months ago

milkmuffin commented 11 months ago

I am on Windows 10 using Chrome.

I have noticed that scrolling on the main window has intention to change the volume. When I do this though, it's jumping to 0% or 100%.

A similar behaviour happens when I try and scroll the playlist. It scrolls very rapidly, tending towards the top or bottom.

I suspect the related code is:

return dispatch(setVolume(currentVolume + e.deltaY));
milkmuffin commented 11 months ago

I'm not sure about the dispatch now. I was trying to peek at the messages being sent to the store, and I don't think they're getting sent. Confirmed that it's dispatching this function:

(dispatch, getState) => {
                const currentVolume = getState().media.volume;
                return dispatch(media_setVolume(currentVolume + e.deltaY));
              }

I'm also noticing this error in the console.

Unable to preventDefault inside passive event listener invocation. (which is reproducible on webamp.org).