Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable context menu enter shortcut for web platform #49061

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/libs/shouldEnableEnterShortcut/index.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default true;
1 change: 1 addition & 0 deletions src/libs/shouldEnableEnterShortcut/index.ts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's rename it to be very specific.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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 shouldEnableEnterShortcut from '@libs/shouldEnableEnterShortcut';
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 && shouldEnableEnterShortcut, shouldPreventDefault: false},
);

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