feat(components): [virtual-list] support horizontal scrolling with mouse wheel on Windows/ubuntu#22168
Conversation
commit: |
|
🧪 Playground Preview: https://element-plus.run/?pr=22168 |
#22024 includes support for mouse scrolling. Note that you should hold down the |
|
If horizontal Tabs need to support vertical scrolling, I suggest implementing it inside the Tabs component to avoid breaking the behavior of the But we can wait for the members’ opinions first.😃 |
|
Thank you for the reminder. On my computer, holding the |
Me too, shift + scroll doesn't work.
Honestly I'm little bit surprised other libraries like ant design handle this behavior. It feels unnatural to allow this type of scroll. That said i don't really have an opinion on this. |
|
@Dsaquel Hello, I have found a problem. 🤔 If we modify it directly like this: So we might still need the following code to handle this issue. I've thought of two ways to handle it.
I'm not sure which approach is more suitable. Do you have any thoughts on this? 👀 👀 |
|
Nice catch, i need to hold and understand why we both cannot scroll using shift key. |
This appears to be caused by differences between systems or browsers. This file might help address the issue: https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js P.S: The mousewheel directive also depends on it. |
|
Thank you, but the issue is still not resolved after I used Maybe some of the code in |
Can we try using the |
|
Thank you, but this seems unrelated to |
|
I found a piece of code in So I added this logic to |
|
Hello, @keeplearning66, your PR title does not meet the standards, please refer to here. |
|
Unfortunately, with my linux system (Ubuntu 24) using shift + scroll to scroll horizontally doesn't work in local or playground. |
On Firefox running in an Ubuntu 24 virtual machine, native scrolling doesn’t work for me, but it works correctly inside the Tabs component. Is there any configuration I need to adjust? 20251228-161323.mp4 |
I'm in a different desktop but still using Ubuntu 24 and both works now... 😆. |
|
@keeplearning66 Thanks for your contribution! ❤️ |


Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.resolve #22370
Currently, when there are many tabs in the horizontal direction, users can only scroll through the tabs using a touchpad, as the mouse wheel cannot be used for scrolling since
deltaXis always0(On my computer, holding theShiftkey doesn't enable horizontal scrolling of the tabs either).If users are accustomed to using a mouse while browsing the web, they may prefer scrolling with the mouse wheel. Therefore, directly supporting horizontal scrolling with the mouse wheel could provide a better experience.