Skip to content

Commit

Permalink
Fix scroll issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Sep 28, 2023
1 parent 2c3c67f commit c2d1073
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions panel/src/components/Dropdowns/DropdownContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit c2d1073

Please sign in to comment.