Skip to content

Commit

Permalink
chore: Improved context menu behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Mar 25, 2021
1 parent 6a7d7af commit 4166257
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/ContextMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function ContextMenu({
}, [onOpen, onClose, previousVisible, rest.visible]);

return (
<Menu {...rest}>
<Menu hideOnClickOutside preventBodyScroll {...rest}>
{(props) => (
<Position {...props}>
<Background>
Expand Down
7 changes: 6 additions & 1 deletion app/menus/DocumentMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ function DocumentMenu({
}: Props) {
const team = useCurrentTeam();
const { policies, collections, ui, documents } = useStores();
const menu = useMenuState({ modal });
const menu = useMenuState({
modal,
unstable_preventOverflow: true,
unstable_fixed: true,
unstable_flip: true,
});
const history = useHistory();
const { t } = useTranslation();
const [renderModals, setRenderModals] = React.useState(false);
Expand Down
2 changes: 1 addition & 1 deletion shared/i18n/locales/en_US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@
"Collections are for grouping your documents. They work best when organized around a topic or internal team — Product or Engineering for example.": "Collections are for grouping your documents. They work best when organized around a topic or internal team — Product or Engineering for example.",
"Creating": "Creating",
"Create": "Create",
"Edit {{noun}}": "Edit {{noun}}",
"Hide contents": "Hide contents",
"Show contents": "Show contents",
"Edit {{noun}}": "Edit {{noun}}",
"Archived": "Archived",
"Anyone with the link <1></1>can view this document": "Anyone with the link <1></1>can view this document",
"Share": "Share",
Expand Down

0 comments on commit 4166257

Please sign in to comment.