Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java

Issue 12093068: Adding missing UpdateTextInputState calls after each ime event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding the missing selection values to EditorInfo Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | content/renderer/render_view_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
index e5ddc2987ac770e604509d1ebe563f20667b9fd5..f421d954f3e3ac375fb6352469d23b7c20d5497c 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java
@@ -735,6 +735,16 @@ class ImeAdapter {
| InputType.TYPE_NUMBER_VARIATION_NORMAL;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT;
}
+
+ Editable editable = getEditable();
+ int selectionStart = Selection.getSelectionStart(editable);
+ int selectionEnd = Selection.getSelectionEnd(editable);
+ if (selectionStart < 0 || selectionEnd < 0) {
+ selectionStart = editable.length();
+ selectionEnd = selectionStart;
+ }
+ outAttrs.initialSelStart = selectionStart;
+ outAttrs.initialSelEnd = selectionEnd;
}
}
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | content/renderer/render_view_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698