Skip to content

Commit

Permalink
Merge pull request #49061 from bernhardoj/fix/48451-new-line-added-wh…
Browse files Browse the repository at this point in the history
…en-edit

Disable context menu enter shortcut for web platform
  • Loading branch information
lakchote authored Sep 13, 2024
2 parents 04762ac + a0bfe04 commit 5fd937e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default true;
1 change: 1 addition & 0 deletions src/libs/shouldEnableContextMenuEnterShortcut/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default false;
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useStyleUtils from '@hooks/useStyleUtils';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
import shouldEnableContextMenuEnterShortcut from '@libs/shouldEnableContextMenuEnterShortcut';
import * as Session from '@userActions/Session';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -257,7 +258,7 @@ function BaseReportActionContextMenu({
menuItemRefs.current[focusedIndex]?.triggerPressAndUpdateSuccess?.();
setFocusedIndex(-1);
},
{isActive: shouldEnableArrowNavigation, shouldPreventDefault: false},
{isActive: shouldEnableArrowNavigation && shouldEnableContextMenuEnterShortcut, shouldPreventDefault: false},
);

const openOverflowMenu = (event: GestureResponderEvent | MouseEvent, anchorRef: MutableRefObject<View | null>) => {
Expand Down

0 comments on commit 5fd937e

Please sign in to comment.