diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 48dc84922ddc2..b067d7194de7d 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -3510,6 +3510,9 @@ public class WebView extends AbsoluteLayout mDrawCursorRing = true; if (mNativeClass != 0) { nativeRecordButtons(true, false, true); + if (inEditingMode()) { + mWebViewCore.sendMessage(EventHub.SET_ACTIVE, 1, 0); + } } } else { // If our window gained focus, but we do not have it, do not @@ -3552,7 +3555,7 @@ public class WebView extends AbsoluteLayout // Do not need to also check whether mWebViewCore is null, because // mNativeClass is only set if mWebViewCore is non null if (mNativeClass == 0) return; - mWebViewCore.sendMessage(EventHub.SET_INACTIVE); + mWebViewCore.sendMessage(EventHub.SET_ACTIVE, 0, 0); } @Override diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java index 8405ffb8198d3..d8d980816cf57 100644 --- a/core/java/android/webkit/WebViewCore.java +++ b/core/java/android/webkit/WebViewCore.java @@ -376,7 +376,7 @@ final class WebViewCore { String currentText, int keyCode, int keyValue, boolean down, boolean cap, boolean fn, boolean sym); - private native void nativeSetFocusControllerInactive(); + private native void nativeSetFocusControllerActive(boolean active); private native void nativeSaveDocumentState(int frame); @@ -613,7 +613,7 @@ final class WebViewCore { "LOAD_DATA", // = 139; "TOUCH_UP", // = 140; "TOUCH_EVENT", // = 141; - "SET_INACTIVE", // = 142; + "SET_ACTIVE", // = 142; "ON_PAUSE", // = 143 "ON_RESUME", // = 144 "FREE_MEMORY", // = 145 @@ -671,7 +671,7 @@ final class WebViewCore { // Used to tell the focus controller not to draw the blinking cursor, // based on whether the WebView has focus and whether the WebView's // cursor matches the webpage's focus. - static final int SET_INACTIVE = 142; + static final int SET_ACTIVE = 142; // lifecycle activities for just this DOM (unlike pauseTimers, which // is global) @@ -954,8 +954,8 @@ final class WebViewCore { break; } - case SET_INACTIVE: - nativeSetFocusControllerInactive(); + case SET_ACTIVE: + nativeSetFocusControllerActive(msg.arg1 == 1); break; case ADD_JS_INTERFACE: