jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
679 stars 58 forks source link

x-select mouse wheel scroll very slow #75

Closed mastercoms closed 5 years ago

mastercoms commented 5 years ago

Observed behavior

When expanded, x-select scrolls very slowly and tries to expand to a full height at certain window sizes.

Expected behavior

x-select either starts at the full height or scrolls at the proper speed.

Reproduction steps

Create an x-select with some elements and then resize the vertical height of the window to just almost not have enough room. For example on the demo page, I used a vertical height of 250px. Then click the x-select to expand it and try to scroll with the mouse wheel.

Information

Version: 0.0.141 Platform: Windows and Linux Electron 2.0.4

jarek-foksa commented 5 years ago

I'm unable to reproduce this issue on macOS, could you please provide an animated GIF or a video recording demonstrating it?

mastercoms commented 5 years ago

https://i.imgur.com/kkqxSke.gifv

Here is a GIF on Chrome 67.0.3396.99 using the demo page, 250px height.

jarek-foksa commented 5 years ago

I followed the exact steps using a trackpad but I couldn't reproduce the bug: https://youtu.be/eOmcKi7Cb0k

Perhaps it happens only when using a mouse wheel?

mastercoms commented 5 years ago

Maybe. I went into Chrome's responsive mode dev tool and it works fine with the mouse wheel there, but it's most likely emulating a different input with that.

I also just tried changing the mouse wheel line count from 3 to 100 and there was no change in speed for the menu.

23phy commented 5 years ago

Any updates on this? I can still reproduce it in the demo page, the x-select section. Something I noticed, as you can see in the gif underneath, is that after a certain amount of slow scrolling, it reverts back to normal, also getting to the top of the list, no longer scrolls slow. xel

jarek-foksa commented 5 years ago

@23phy I was unable to reproduce this issue and I'm not really sure what could be causing it. If someone is interested in fixing it, the scrolling behavior is implemented here.

Septh commented 5 years ago

The issue is still present.

As @23phy's gif shows, first the menu's height slowly grows and then only when the menu fills the whole window height does the scroll happen.

I'm not sure what's going on here, but the whole _onScroll() function seems to be at fault. If I insert a return statement here with DevTools (see pic below) then the function does nothing and the component works just fine.

xselect

jarek-foksa commented 5 years ago

I managed to reproduce this bug using either a trackpad or a mouse on Windows 10 running in a virtual machine.

This seems to be a Chrome bug, but I have implemented a workaround in Xel version 0.0.191.