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

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

Issue 2497463002: Fix Vietnamese characters to work correctly on contenteditable (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
index 35e4bf21b82abc45bbfe0ddcfb98f1fde5d12244..93a9e27796e83a78fdffea3caa6b4f0b691562c7 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java
@@ -115,11 +115,15 @@ public class ThreadedInputConnection extends BaseInputConnection
}
@Override
- public void updateStateOnUiThread(final String text, final int selectionStart,
+ public void updateStateOnUiThread(String text, final int selectionStart,
final int selectionEnd, final int compositionStart, final int compositionEnd,
boolean singleLine, final boolean isNonImeChange) {
ImeUtils.checkOnUiThread();
+ // crbug.com/663880: Non-breaking spaces can cause the IME to get confused. Replace with
+ // normal spaces.
+ text = text.replace('\u00A0', ' ');
+
mCachedTextInputState =
new TextInputState(text, new Range(selectionStart, selectionEnd),
new Range(compositionStart, compositionEnd), singleLine, !isNonImeChange);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698