From 87eccfb4cab4df109a6a5fb4b04a75e696729a8f Mon Sep 17 00:00:00 2001 From: vkamn Date: Wed, 4 Feb 2026 07:35:17 +0300 Subject: [PATCH] fix: fix scrolling on drawers (#2183) --- client/ui/qml/Controls2/DrawerType2.qml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/client/ui/qml/Controls2/DrawerType2.qml b/client/ui/qml/Controls2/DrawerType2.qml index c88f9e7c..bfa31c63 100644 --- a/client/ui/qml/Controls2/DrawerType2.qml +++ b/client/ui/qml/Controls2/DrawerType2.qml @@ -49,10 +49,29 @@ Item { return drawerContent.state === stateName } + function isDrawerType2(obj) { + return obj && typeof obj.drawerExpandedStateName !== "undefined" && + typeof obj.drawerCollapsedStateName !== "undefined" + } + + function isDescendantOfDrawer(obj) { + var current = obj + while (current && current !== root.parent) { + if (isDrawerType2(current)) { + return true + } + current = current.parent + } + return false + } + function findComponent(obj, typeCtor) { if (!obj) return null + if (isDrawerType2(obj) || isDescendantOfDrawer(obj)) + return null + if (obj instanceof typeCtor) return obj