Merge "Fix android:focusableInTouchMode support" into jb-dev
This commit is contained in:
@@ -1598,8 +1598,6 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
|
||||
private void init() {
|
||||
OnTrimMemoryListener.init(mContext);
|
||||
mWebView.setWillNotDraw(false);
|
||||
mWebView.setFocusable(true);
|
||||
mWebView.setFocusableInTouchMode(true);
|
||||
mWebView.setClickable(true);
|
||||
mWebView.setLongClickable(true);
|
||||
|
||||
@@ -5767,14 +5765,15 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mWebView.isFocused()) {
|
||||
mWebView.requestFocus();
|
||||
}
|
||||
|
||||
if (mInputDispatcher == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mWebView.isFocusable() && mWebView.isFocusableInTouchMode()
|
||||
&& !mWebView.isFocused()) {
|
||||
mWebView.requestFocus();
|
||||
}
|
||||
|
||||
if (mInputDispatcher.postPointerEvent(ev, getScrollX(),
|
||||
getScrollY() - getTitleHeight(), mZoomManager.getInvScale())) {
|
||||
mInputDispatcher.dispatchUiEvents();
|
||||
|
||||
@@ -634,6 +634,7 @@ please see styles_device_defaults.xml.
|
||||
|
||||
<style name="Widget.WebView">
|
||||
<item name="android:focusable">true</item>
|
||||
<item name="android:focusableInTouchMode">true</item>
|
||||
<item name="android:scrollbars">horizontal|vertical</item>
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user