From 5f3d71861cbfae7b6833c0a22b70e56541bf666e Mon Sep 17 00:00:00 2001 From: ck Date: Thu, 20 Jun 2024 10:22:51 +0800 Subject: [PATCH] fix: folder not support wheel event on window mode search edit not define.. Issue: https://github.com/linuxdeepin/developer-center/issues/8972 --- qml/FolderGridViewPopup.qml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/qml/FolderGridViewPopup.qml b/qml/FolderGridViewPopup.qml index a20103d4..424acfdf 100644 --- a/qml/FolderGridViewPopup.qml +++ b/qml/FolderGridViewPopup.qml @@ -135,7 +135,7 @@ Popup { scrollGestureEnabled: false // TODO: this might not be the correct way to handle wheel - onWheel: { + onWheel: function (wheel) { let xDelta = wheel.angleDelta.x / 8 let yDelta = wheel.angleDelta.y / 8 let toPage = 0; // -1 prev, +1 next, 0 don't change @@ -145,14 +145,8 @@ Popup { toPage = (xDelta > 0) ? 1 : -1 } if (toPage < 0) { - if (!searchEdit.focus) { // reset keyboard focus when using mouse to flip page, but keep searchEdit focus - baseLayer.focus = true - } decrementPageIndex(folderPagesView) } else if (toPage > 0) { - if (!searchEdit.focus) { // reset keyboard focus when using mouse to flip page, but keep searchEdit focus - baseLayer.focus = true - } incrementPageIndex(folderPagesView) } }