From c2d107345b73bbccda16c3b4abf8522606f2a0d6 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Thu, 28 Sep 2023 16:08:34 +0200 Subject: [PATCH] Fix scroll issue --- panel/src/components/Dropdowns/DropdownContent.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/src/components/Dropdowns/DropdownContent.vue b/panel/src/components/Dropdowns/DropdownContent.vue index 13854a733b..ca3e4e2885 100644 --- a/panel/src/components/Dropdowns/DropdownContent.vue +++ b/panel/src/components/Dropdowns/DropdownContent.vue @@ -174,7 +174,7 @@ export default { await this.$nextTick(); if (this.$el && this.opener) { - window.addEventListener("resize", this.position); + window.addEventListener("resize", this.setPosition); await this.setPosition(); // restore the scroll position window.scrollTo(0, scrollTop); @@ -288,7 +288,7 @@ export default { this.axis.y = "bottom"; } } else if ( - rect.top + rect.height > window.innerHeight - safeSpace && + opener.top + rect.height > window.innerHeight - safeSpace && rect.height + safeSpace < rect.top ) { this.axis.y = "top";