fix: trackpad horizontal scroll on tabs not working properly

This commit is contained in:
Fabio Di Stasio 2022-10-04 10:12:16 +02:00
parent dd9c089d27
commit ba5a1b68ab
1 changed files with 2 additions and 0 deletions

View File

@ -638,6 +638,8 @@ const hideProcessesModal = () => {
const addWheelEvent = () => {
if (!hasWheelEvent.value) {
tabWrap.value.$el.addEventListener('wheel', (e: WheelEvent) => {
if (e.deltaX !== 0) return; // If trackpad horizontal scroll
if (e.deltaY > 0) tabWrap.value.$el.scrollLeft += 50;
else tabWrap.value.$el.scrollLeft -= 50;
});