grid icon indicating copy to clipboard operation
grid copied to clipboard

fix: shift + wheel scroll doesn't work

Open prayinforrain opened this issue 2 years ago • 1 comments

Hi, thank you for such a nice package. I really appreciate it 😁

However I noticed that horizontal scroll with mouse wheel(shift + wheelScroll) doesn't make any scroll, even if there's a handler for it. So I made a small commit to fix it.

I hope this PR will help..

*Tested on MacOS Ventura 13.4, Chrome

prayinforrain avatar Oct 01 '23 06:10 prayinforrain

@prayinforrain your new code is work on osx system.but on window, it should use deltaY.

I can offer a demo code

        const isMac = /Mac/i.test(navigator.userAgent);

        let dx = isScrollingHorizontally ? (isMac ? deltaX : deltaY) : deltaX;

fallenleavesguy avatar Aug 06 '24 09:08 fallenleavesguy