Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java |
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 50044ae9e2bd94dae0e8ffe57202de5dc144819f..2a5646f304fa8d0cb6737e95df124dbe6913552c 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 |
@@ -2087,7 +2087,14 @@ public class ContentViewCore |
@Override |
public void onDestroyActionMode() { |
mActionMode = null; |
- if (mUnselectAllOnActionModeDismiss) mImeAdapter.unselect(); |
+ if (mUnselectAllOnActionModeDismiss) { |
+ if (isSelectionEditable()) { |
+ int selectionEnd = Selection.getSelectionEnd(mEditable); |
+ mInputConnection.setSelection(selectionEnd, selectionEnd); |
+ } else { |
+ mImeAdapter.unselect(); |
+ } |
+ } |
getContentViewClient().onContextualActionBarHidden(); |
} |