Skip to content

Commit

Permalink
Mobile - AztecView - Move notifyInputChange to the focus/blur functio…
Browse files Browse the repository at this point in the history
…ns within AztecInputState, to fix an issue where these are called directly.
  • Loading branch information
Gerardo committed May 5, 2022
1 parent e3a82e9 commit 695a65b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/react-native-aztec/src/AztecInputState.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const notifyInputChange = () => {
*/
export const focus = ( element ) => {
TextInputState.focusTextInput( element );
notifyInputChange();
};

/**
Expand All @@ -99,6 +100,7 @@ export const focus = ( element ) => {
*/
export const blur = ( element ) => {
TextInputState.blurTextInput( element );
notifyInputChange();
};

/**
Expand Down
3 changes: 0 additions & 3 deletions packages/react-native-aztec/src/AztecView.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ class AztecView extends Component {
}

_onFocus( event ) {
AztecInputState.notifyInputChange();

if ( ! this.props.onFocus ) {
return;
}
Expand All @@ -136,7 +134,6 @@ class AztecView extends Component {
this.selectionEndCaretY = null;

AztecInputState.blur( this.aztecViewRef.current );
AztecInputState.notifyInputChange();

if ( ! this.props.onBlur ) {
return;
Expand Down

0 comments on commit 695a65b

Please sign in to comment.