diff --git a/app/assets/javascripts/components/NotesOptions.tsx b/app/assets/javascripts/components/NotesOptions.tsx index 9b44b0ab6..04c9f56b0 100644 --- a/app/assets/javascripts/components/NotesOptions.tsx +++ b/app/assets/javascripts/components/NotesOptions.tsx @@ -68,11 +68,11 @@ export const NotesOptions = observer( const buttonRect = tagsButtonRef.current.getBoundingClientRect(); const footerHeight = 32; - if ((buttonRect.top + maxTagsMenuSize) > (clientHeight - footerHeight)) { + if (buttonRect.top + maxTagsMenuSize > clientHeight - footerHeight) { setTagsMenuMaxHeight(clientHeight - buttonRect.top - footerHeight - 2); } - if ((buttonRect.right + maxTagsMenuSize) > clientWidth) { + if (buttonRect.right + maxTagsMenuSize > clientWidth) { setTagsMenuPosition({ top: buttonRect.top, right: clientWidth - buttonRect.left, @@ -84,7 +84,6 @@ export const NotesOptions = observer( }); } - setTagsMenuOpen(!tagsMenuOpen); }; @@ -165,7 +164,7 @@ export const NotesOptions = observer( {appState.tags.tags.map((tag) => (