Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Lookup component scrollbar height after open and closing menu #682

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix Lookup component scrollbar height after open and closing menu
Bug: T325822
  • Loading branch information
guergana committed Aug 8, 2023
commit 76d859902afb71496f98bd1029296632e674ed97
5 changes: 4 additions & 1 deletion vue-components/src/components/OptionsMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 161,10 @@ export default Vue.extend( {
const maxNumberOfElementsDisplayed = 6;
if ( menuItems && menuItems.length > maxNumberOfElementsDisplayed ) {
const menuHeight = menuItems[ maxNumberOfElementsDisplayed ].offsetTop - menuItems[ 0 ].offsetTop;
this.maxHeight = menuHeight;
// See: https://phabricator.wikimedia.org/T325822#9078296
if ( menuHeight > 0 ) {
this.maxHeight = menuHeight;
}
} else {
this.maxHeight = null;
}
Expand Down
Loading