From 8ecd352bbf92ec51bd913b5a95e1c52590549be5 Mon Sep 17 00:00:00 2001 From: Dave Miller Date: Fri, 8 Jan 2016 05:04:26 -0800 Subject: [PATCH] Fix the 'end' value in the onTextInput callback for onscreen keyboard Summary: public The 'end' value in the onTextInput callback was incorrectly computed. It now is correct. The value of start and end are relative to the entirety of the entire prechange text in the text input. Reviewed By: andreicoman11 Differential Revision: D2815064 fb-gh-sync-id: e9f9c84cc5836042d0ffcccc991df72b725ab994 --- .../facebook/react/views/textinput/ReactTextInputManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index ebb9a31bf..9184c6617 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -376,7 +376,7 @@ public class ReactTextInputManager extends newText, oldText, start, - count > 0 ? start + count - 1 : start + before)); + start + before)); } @Override