Avoid warning when scrolling main window

This commit is contained in:
Jordan Eldredge 2025-06-29 17:26:52 -07:00
parent 2ea015c504
commit a2eb557599

View file

@ -123,10 +123,12 @@ export function adjustVolume(volumeDiff: number): Thunk {
}
export function scrollVolume(e: React.WheelEvent<HTMLDivElement>): Thunk {
e.preventDefault();
// https://github.com/facebook/react/issues/22794
// e.preventDefault();
// TODO: https://github.com/captbaritone/webamp/issues/1301
return (dispatch, getState) => {
const currentVolume = getState().media.volume;
// Using pixels as percentage difference here is a bit arbirary, but... oh well.
// Using pixels as percentage difference here is a bit arbitrary, but... oh well.
return dispatch(setVolume(currentVolume + e.deltaY));
};
}