From a62aef3d7fa98aafb37014ac82b34260f3f91d9b Mon Sep 17 00:00:00 2001 From: Hui Shu Date: Tue, 25 Nov 2014 10:36:49 -0800 Subject: 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 --- .../android/java/src/org/chromium/content/browser/ContentViewCore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 196f83d9de..3140e22e87 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 @@ public class ContentViewCore } private void clearUserSelection() { - if (isSelectionEditable()) { + if (mFocusedNodeEditable) { if (mInputConnection != null) { int selectionEnd = Selection.getSelectionEnd(mEditable); mInputConnection.setSelection(selectionEnd, selectionEnd); -- cgit v1.2.3