Skip to content

Commit

Permalink
Merge pull request #12498 from aimane-chnaif/fix-10693
Browse files Browse the repository at this point in the history
  • Loading branch information
thienlnam authored Nov 10, 2022
2 parents 5401816 + a18c28c commit 819fb99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/BigNumberPad.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class BigNumberPad extends React.Component {
ControlSelection.unblock();
this.props.longPressHandlerStateChanged(false);
}}
onMouseDown={e => e.preventDefault()}
/>
);
})}
Expand Down
5 changes: 5 additions & 0 deletions src/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ const propTypes = {
/** A function that is called when the button is released */
onPressOut: PropTypes.func,

/** Callback that is called when mousedown is triggered. */
onMouseDown: PropTypes.func,

/** Call the onPress function when Enter key is pressed */
pressOnEnter: PropTypes.bool,

Expand Down Expand Up @@ -124,6 +127,7 @@ const defaultProps = {
onLongPress: () => {},
onPressIn: () => {},
onPressOut: () => {},
onMouseDown: undefined,
pressOnEnter: false,
enterKeyEventListenerPriority: 0,
style: [],
Expand Down Expand Up @@ -249,6 +253,7 @@ class Button extends Component {
}}
onPressIn={this.props.onPressIn}
onPressOut={this.props.onPressOut}
onMouseDown={this.props.onMouseDown}
disabled={this.props.isLoading || this.props.isDisabled}
style={[
this.props.isDisabled ? {...styles.cursorDisabled, ...styles.noSelect} : {},
Expand Down

0 comments on commit 819fb99

Please sign in to comment.