mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Avoid warning when scrolling main window
This commit is contained in:
parent
2ea015c504
commit
a2eb557599
1 changed files with 4 additions and 2 deletions
|
|
@ -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));
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue