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

Fix keyboard bug when opening attachment modal #2460

Merged
merged 4 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion src/components/Popover/PopoverPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ const propTypes = {
right: PropTypes.number,
bottom: PropTypes.number,
left: PropTypes.number,
}).isRequired,
}),
};

const defaultProps = {
...(_.omit(defaultModalProps, 'type', 'popoverAnchorPosition')),

// Anchor position is optional only because it is not relevant on mobile
anchorPosition: {},
};

export {propTypes, defaultProps};
2 changes: 1 addition & 1 deletion src/components/Popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Popover = props => (
<Modal
type={props.isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.POPOVER}
popoverAnchorPosition={props.anchorPosition}
// eslint-disable-next-line react/jsx-props-no-spreading
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
animationIn={props.isSmallScreenWidth ? undefined : props.animationIn}
animationOut={props.isSmallScreenWidth ? undefined : props.animationOut}
Expand Down
4 changes: 0 additions & 4 deletions src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ class ReportActionCompose extends React.Component {
onPress={(e) => {
e.preventDefault();
this.setMenuVisibility(true);

/* Keep last focus inside the input so that focus is restored
on modal close. Otherwise breaks modal 2 modal transition */
this.focus();
MariaHCD marked this conversation as resolved.
Show resolved Hide resolved
}}
style={styles.chatItemAttachButton}
underlayColor={themeColors.componentBG}
Expand Down