diff --git a/app/assets/javascripts/components/NotesOptions.tsx b/app/assets/javascripts/components/NotesOptions.tsx index 8c80f5f5495..b2a0ac3b4b0 100644 --- a/app/assets/javascripts/components/NotesOptions.tsx +++ b/app/assets/javascripts/components/NotesOptions.tsx @@ -72,11 +72,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, @@ -88,7 +88,6 @@ export const NotesOptions = observer( }); } - setTagsMenuOpen(!tagsMenuOpen); }; @@ -169,7 +168,7 @@ export const NotesOptions = observer( {appState.tags.tags.map((tag) => (