fix: fix scrolling on drawers (#2183)

This commit is contained in:
vkamn
2026-02-04 07:35:17 +03:00
committed by GitHub
parent a983d0504e
commit 87eccfb4ca

View File

@@ -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