diff options
author | Peter Nilsson <peter7.nilsson@sonymobile.com> | 2013-02-07 14:31:25 +0100 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2013-04-10 18:50:10 +0200 |
commit | 2b3cef0dd74cb9470e5387b015ee7a13af1fff7b (patch) | |
tree | 4bbe74a89a1762482ff92f25b06014091c243915 /core/java/android/webkit/WebViewClassic.java | |
parent | 212af6dbd7b002bdfcc869fc0ee06d5d3d711fd6 (diff) | |
download | frameworks_base-2b3cef0dd74cb9470e5387b015ee7a13af1fff7b.zip frameworks_base-2b3cef0dd74cb9470e5387b015ee7a13af1fff7b.tar.gz frameworks_base-2b3cef0dd74cb9470e5387b015ee7a13af1fff7b.tar.bz2 |
Can not mark the same content of browser page after copy
Marking a text on the web page and then press copy works,
but trying to mark the same text again does not work.
The reason for this is that the selection never gets
cleared in webkit.
The fix, calling cleaSelection in the onDestroyActionMode.
Also added clearSelection when getting an
onConfigurationChange.
Change-Id: I59b384cb5441b6a3a05007ea7e77f9699889a87c
Diffstat (limited to 'core/java/android/webkit/WebViewClassic.java')
-rw-r--r-- | core/java/android/webkit/WebViewClassic.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/webkit/WebViewClassic.java b/core/java/android/webkit/WebViewClassic.java index 4db9f6c..c576546 100644 --- a/core/java/android/webkit/WebViewClassic.java +++ b/core/java/android/webkit/WebViewClassic.java @@ -4478,6 +4478,13 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc return selectText(x, y); } + public void clearSelection() { + selectionDone(); + if (mWebViewCore != null) { + mWebViewCore.sendMessage(EventHub.SELECT_TEXT, null); + } + } + /** * Select the word at the indicated content coordinates. */ @@ -4495,7 +4502,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc public void onConfigurationChanged(Configuration newConfig) { mCachedOverlappingActionModeHeight = -1; if (mSelectingText && mOrientation != newConfig.orientation) { - selectionDone(); + clearSelection(); } mOrientation = newConfig.orientation; if (mWebViewCore != null && !mBlockWebkitViewMessages) { |