Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloercoli committed Apr 6, 2018
1 parent e2e36f0 commit 4a2da48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,23 +156,23 @@ public void setOnScroll(final ReactAztecView view, boolean onScroll) {

@Override
protected void addEventEmitters(final ThemedReactContext reactContext, final ReactAztecView aztecView) {
final ReactAztecText editText = aztecView.getAztecText();
editText.addTextChangedListener(new AztecTextWatcher(reactContext, aztecView));
editText.setOnFocusChangeListener(
aztecView.getAztecText().addTextChangedListener(new AztecTextWatcher(reactContext, aztecView));
aztecView.getAztecText().setOnFocusChangeListener(
new View.OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
EventDispatcher eventDispatcher = reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher();
final ReactAztecText editText = (ReactAztecText)v;
if (hasFocus) {
eventDispatcher.dispatchEvent(
new ReactAztecFocusEvent(
aztecView.getId())); // TODO is the correct ID?
aztecView.getId()));
} else {
eventDispatcher.dispatchEvent(
new ReactAztecBlurEvent(
aztecView.getId()));

eventDispatcher.dispatchEvent(
new ReactaztecEndEditingEvent(
new ReactAztecEndEditingEvent(
aztecView.getId(),
editText.getText().toString()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* Event emitted by Aztec native view when text editing ends,
* because of the user leaving the text input.
*/
class ReactaztecEndEditingEvent extends Event<ReactaztecEndEditingEvent> {
class ReactAztecEndEditingEvent extends Event<ReactAztecEndEditingEvent> {

private static final String EVENT_NAME = "topEndEditing";

private String mText;

public ReactaztecEndEditingEvent(
public ReactAztecEndEditingEvent(
int viewId,
String text) {
super(viewId);
Expand Down

0 comments on commit 4a2da48

Please sign in to comment.