Skip to content

Commit

Permalink
[FIX] Rich Text loop when autocompleting text on iOS (#1702)
Browse files Browse the repository at this point in the history
* fix iOS focus loop

* update ref

* some styling fix

* update ref

* back the TextInputState

* update ref

* revert changes

* remove  unused variable

* update ref

* update ref

* remove register and unregister of text input

* update ref
  • Loading branch information
dratwas authored Jan 7, 2020
1 parent 63576ba commit 4163a5e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gutenberg
3 changes: 2 additions & 1 deletion react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ extension RCTAztecView: UITextViewDelegate {
}

func textViewDidEndEditing(_ textView: UITextView) {
onBlur?([:])
let text = packForRN(cleanHTML(), withName: "text")
onBlur?(text)
}
}
2 changes: 1 addition & 1 deletion react-native-aztec/src/AztecView.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class AztecView extends React.Component {

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

0 comments on commit 4163a5e

Please sign in to comment.