fix: take footer height into account when checking need for tag menu max height

This commit is contained in:
Antonella Sgarlatta
2021-05-19 16:19:31 -03:00
parent eb929f9e87
commit 82730fe22d

View File

@@ -68,7 +68,7 @@ export const NotesOptions = observer(
const { offsetTop, offsetWidth } = tagsButtonRef.current;
const footerHeight = 32;
if (buttonRect.top + maxTagsMenuSize > clientHeight) {
if (buttonRect.top + maxTagsMenuSize > clientHeight - footerHeight) {
setTagsMenuMaxHeight(clientHeight - buttonRect.top - footerHeight - 2);
}