Skip to content

Commit

Permalink
Merge pull request #9653 from garymathews/TIMOB-25580_70X
Browse files Browse the repository at this point in the history
[7_0_X][TIMOB-25580] Android: Prevent EVENT_RETURN firing twice
  • Loading branch information
Lokesh Choudhary committed Dec 5, 2017
2 parents 2388517 + 8ba322c commit f09dec4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,9 @@ public boolean onEditorAction(TextView v, int actionId, KeyEvent keyEvent)
//this callback is triggered twice (except for keys that are mapped to EditorInfo.IME_ACTION_NEXT or EditorInfo.IME_ACTION_DONE). The first check is to deal with those keys - filter out
//one of the two callbacks, and the next checks deal with 'Next' and 'Done' callbacks, respectively.
//Refer to TiUIText.handleReturnKeyType(int) for a list of return keys that are mapped to EditorInfo.IME_ACTION_NEXT and EditorInfo.IME_ACTION_DONE.
if ((actionId == EditorInfo.IME_NULL && keyEvent != null) ||
actionId == EditorInfo.IME_ACTION_NEXT ||
actionId == EditorInfo.IME_ACTION_DONE ) {
if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_DONE) {
fireEvent(TiC.EVENT_RETURN, data);
}


return false;
}
Expand Down

0 comments on commit f09dec4

Please sign in to comment.