Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3231)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java

Issue 2430153006: Forward touch events from the toolbar to the NTP only if the fakebox hasn't reached the top of the … (Closed)
Patch Set: review Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
index a5a469265dacbd2794ad807c1206ba97d3e14922..092fc26cfc0e0c01422f75300816b0d2d5095612 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
@@ -452,8 +452,9 @@ public class ToolbarPhone extends ToolbarLayout
@Override
public boolean onTouchEvent(MotionEvent ev) {
- // Forward touch events to the NTP if the toolbar is moved away.
- if (mNtpSearchBoxTranslation.y < 0) {
+ // Forward touch events to the NTP if the toolbar is moved away but the search box hasn't
+ // reached the top of the page yet.
+ if (mNtpSearchBoxTranslation.y < 0 && mLocationBar.getTranslationY() > 0) {
NewTabPage newTabPage = getToolbarDataProvider().getNewTabPageForCurrentTab();
// No null check -- the toolbar should not be moved if we are not on an NTP.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698