Commit acb2df40 authored by Becky Zhou's avatar Becky Zhou Committed by Commit Bot

[Feed] Fix Feed NTP not clickable when hardware keyboard is connected

Bug: 891877
Change-Id: I8c0cae6ad80f290580975983cb2d2f4f6286509b
Reviewed-on: https://chromium-review.googlesource.com/c/1325082
Commit-Queue: Becky Zhou <huayinz@chromium.org>
Reviewed-by: default avatarTheresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606881}
parent 341861b6
......@@ -52,6 +52,7 @@ import org.chromium.chrome.browser.widget.displaystyle.HorizontalDisplayStyle;
import org.chromium.chrome.browser.widget.displaystyle.MarginResizer;
import org.chromium.chrome.browser.widget.displaystyle.UiConfig;
import org.chromium.ui.UiUtils;
import org.chromium.ui.base.DeviceFormFactor;
import java.util.Arrays;
......@@ -197,9 +198,11 @@ public class FeedNewTabPage extends NewTabPage {
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return (mMediator != null && !mMediator.getTouchEnabled())
|| (mFakeboxDelegate != null && mFakeboxDelegate.isUrlBarFocused())
|| super.onInterceptTouchEvent(ev);
if (super.onInterceptTouchEvent(ev)) return true;
if (mMediator != null && !mMediator.getTouchEnabled()) return true;
return !(mTab != null && DeviceFormFactor.isWindowOnTablet(mTab.getWindowAndroid()))
&& (mFakeboxDelegate != null && mFakeboxDelegate.isUrlBarFocused());
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment