New issue
Advanced search Search tips

Issue 722105 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Chrome Home: when phones is held in landscape, the bottom menu buttons are cut off (Forward, Bookmark, Reload etc.)

Reported by billdill...@gmail.com, May 14 2017

Issue description

Steps to reproduce the problem:
in Chrome Home, hold your phone in landscape and tap the menu. The bottom buttons are cut off, see attached screenshot

What is the expected behavior?

What went wrong?
see above

Did this work before? N/A 

Chrome version: 60.0.3097.0  Channel: canary
OS Version: 6.0
Flash Version:
 
Screenshot_20170514-082820.png
141 KB View Download
Cc: mdjones@chromium.org twelling...@chromium.org
Components: -UI UI>Browser>Mobile>NavPanel
Does this repro 100% of the time? I can't get this to happen on my device.
Yes, it's on Dev version too. the phone is Moto E (2nd gen)
What version of Android are you running?

We have a split in our code for menu positioning pre and post Android N to smooth over a change in the framework's positioning of popup windows. We probably need to update that logic.

https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java?type=cs&q=appmenu.java&l=348
Android 6.0
Labels: -Pri-2 -Arch-x86_64 -Via-Wizard-UI M-60 Hotlist-Chrome-Home Pri-1
Owner: twelling...@chromium.org
Status: Assigned (was: Unconfirmed)
I should have clarified - I was asking looking the specific build version. If you go to Chrome Settings > About Phone, or Android Settings > About Phone, there is a specific Android build version listed, e.g. MOB31V.

I can reproduce this on a Nexus 5 running MOB31V on 60.0.3100.0 and 59.0.3071.49 (no bottom nav bar), as well as on a Nexus 5 running LMY49K.

This does not reproduce on 60.0.3076.0.

Here is a tentative regression range:
https://chromium.googlesource.com/chromium/src/+log/60.0.3076.0..60.0.3096.0?pretty=fuller&n=10000
Build/MPI24.65-39-4

Chrome version 60.0.3096.5

Android 6.0.0
Cc: tedc...@chromium.org
On older devices, we're hitting some poor interaction in Android's old logic for positioning popup windows with our app menu height and vertical offset. Short term, we should consider making the menu shorter again (not the ideal UX, but relatively easy). Longer term this is more cause for moving away from ListPopupWindow for the app menu, and using a PopupWindow shown at a specific x, y coordinate.

On my Nexus 5, if the vertical offset is:
 * 0, the popup locationOnScreen_y is 74
 * 1, the popup locationOnScreen_y is 73 ( == 73 - 1)
 * -1, the popup locationOnScreen_y is 75 ( == 74 + 1)
 * -40, the popup locationOnScreen_y is 114 ( == 74 + 40)
 * -80, the popup locationOnScreen_y is 160 ( != 74 + 100)
 * -100, the popup locationOnScreen_y is 200 ( != 74 + 100)
 * -168 (anchor height), the popup locationOnScreen_y is 336 ( != 74 + 168)

I would have expected the locationOnScreen_y for a -168 vertical offset to be 242 (74 + 168), which would place the app menu completely on screen. The framework, however, decides to push it down an extra 94px. The locationOnScreen_y appears to switch to 2 * vertical offset.

If the menu height is changed from 844px to 700px, the calculations become sane again:
 * 0, the popup locationOnScreen_y is 218
 * -168 (anchor height), the popup locationOnScreen_y is 386 ( == 218 + 168)

Screenshots from in-flight patch on a Nexus 5 running L and a Nexus 6P running N MR1.

https://codereview.chromium.org/2891773003
Screenshot_2017-05-17-08-35-49.png
118 KB View Download
Screenshot_2017-05-17-08-35-54.png
108 KB View Download
Screenshot_20170517-083709.png
207 KB View Download
Screenshot_20170517-083716.png
186 KB View Download
Screenshot_20170517-083724.png
650 KB View Download
Screenshot_20170517-083740.png
669 KB View Download
Project Member

Comment 9 by bugdroid1@chromium.org, May 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0feff5f517e63ec7ecf04192464c61c57f9e1686

commit 0feff5f517e63ec7ecf04192464c61c57f9e1686
Author: twellington <twellington@chromium.org>
Date: Wed May 17 16:31:09 2017

[Android] Don't increase app menu height when at bottom pre-N

When the app menu is at the bottom of the screen, do not increase
the height to include the anchor view pre-N. This was causing the app
menu to get cut-off in landscape mode.

Long term we should stop using ListPopupWindow.

BUG= 722105 

Review-Url: https://codereview.chromium.org/2891773003
Cr-Commit-Position: refs/heads/master@{#472474}

[modify] https://crrev.com/0feff5f517e63ec7ecf04192464c61c57f9e1686/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java

Status: Fixed (was: Assigned)
This change will be in tomorrow's Canary build.
Wow you guys are fast! Thank you :)
It's fixed but it's so short in landscape, only 3 items tall! ... can it be made taller?
Long term we will stop using Android's ListPopupWindow widget. That's a rather large undertaking, so short-term the menu will be short in landscape.
This screenshot was taken from the most up to date Canary. Are we stuck with this for the short term?
Screenshot_20170519-111617.png
48.9 KB View Download
Yes, we are. 
I see. Is there a public bug for switching to PopupWindow?
I just filed  issue 724522 .

Sign in to add a comment