Skip to content

Commit

Permalink
Keep focus state on mWeb
Browse files Browse the repository at this point in the history
  • Loading branch information
ginsuma committed Oct 9, 2023
1 parent c5b5685 commit 063ac7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 7 additions & 0 deletions src/components/ThreeDotsMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as Expensicons from '../Icon/Expensicons';
import ThreeDotsMenuItemPropTypes from './ThreeDotsMenuItemPropTypes';
import CONST from '../../CONST';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';
import * as Browser from '../../libs/Browser';

const propTypes = {
/** Tooltip for the popup icon */
Expand Down Expand Up @@ -95,6 +96,12 @@ function ThreeDotsMenu({iconTooltip, icon, iconFill, iconStyles, onIconPress, me
onIconPress();
}
}}
onMouseDown={(e) => {
if (!Browser.isMobile()) {
return;
}
e.preventDefault();
}}
ref={buttonRef}
style={[styles.touchableButtonImage, ...iconStyles]}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON}
Expand Down
9 changes: 0 additions & 9 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import * as Link from '../../libs/actions/Link';
import * as Report from '../../libs/actions/Report';
import * as Session from '../../libs/actions/Session';
import * as Task from '../../libs/actions/Task';
import ReportActionComposeFocusManager from '../../libs/ReportActionComposeFocusManager';
import compose from '../../libs/compose';
import styles from '../../styles/styles';
import themeColors from '../../styles/themes/default';
Expand Down Expand Up @@ -275,14 +274,6 @@ function HeaderView(props) {
anchorPosition={styles.threeDotsPopoverOffset(props.windowWidth)}
menuItems={threeDotMenuItems}
shouldSetModalVisibility={false}
onIconPress={() => {
const {composerRef, editComposerRef, isFocused, isEditFocused} = ReportActionComposeFocusManager;
if (isFocused()) {
composerRef.current.blur();
} else if (isEditFocused()) {
editComposerRef.current.blur();
}
}}
/>
)}
</View>
Expand Down

0 comments on commit 063ac7a

Please sign in to comment.