commit | a62aef3d7fa98aafb37014ac82b34260f3f91d9b | [log] [tgz] |
---|---|---|
author | Hui Shu <hush@google.com> | Tue Nov 25 10:36:49 2014 -0800 |
committer | Hui Shu <hush@google.com> | Tue Nov 25 10:36:49 2014 -0800 |
tree | ddfa908b3e3aad3236de880fe0edc9cd1bbf9bbe | |
parent | eb33a44eef586f62300547e65a8f666276540b64 [diff] |
Cherry pick: Preserve IME state when clearing the selection Cherry pick from Chromium: https://crrev.com/d1d74981ce7baa010996c82a7b3423d06af466f1 Original Description: When a paste or cut operation is performed in an editable region, and the action bar is dismissed, the IME state should be preserved. Ensure this by always using the editable region bit when clearing the selection upon action bar dismissal. BUG=435810 BUG: 18200283 Change-Id: Iefe239341010236ea6833c98ade34499970aae62
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java index 196f83d..3140e22 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1301,7 +1301,7 @@ } private void clearUserSelection() { - if (isSelectionEditable()) { + if (mFocusedNodeEditable) { if (mInputConnection != null) { int selectionEnd = Selection.getSelectionEnd(mEditable); mInputConnection.setSelection(selectionEnd, selectionEnd);