Skip to content

Commit

Permalink
Do not wire OnFocus, but use onPress instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloercoli committed Dec 4, 2018
1 parent 1e0ed52 commit 423c61c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/AztecView.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ class AztecView extends React.Component {
}

_onPress = () => {
this.focus();
this.focus(); // Call to move the focus in RN way (TextInputState)
this._onFocus(); // Check if there are listeners set on the focus event
}

render() {
Expand All @@ -138,7 +139,7 @@ class AztecView extends React.Component {
onHTMLContentWithCursor = { this._onHTMLContentWithCursor }
onSelectionChange = { this._onSelectionChange }
onEnter = { this._onEnter }
onFocus = { this._onFocus }
onFocus = { () => {} } // Do nothing here, the onPress takes care of everything
onBlur = { this._onBlur }
onBackspace = { this._onBackspace }
/>
Expand Down

0 comments on commit 423c61c

Please sign in to comment.