New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 840919 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

[MacViews-Browser] The Wrench Menu changes its place when moving extension icons in it

Project Member Reported by meh...@chromium.org, May 8 2018

Issue description

Chrome Version: Chromium #556848
OS: macOS 10.13.4

What steps will reproduce the problem?
(1) Enable MacViews-Browser
(2) Install some extensions
(3) Hide the extension buttons in the Wrench Menu
(4) Move the window near the Dock, so that the Menu opens to the left of the Wrench Button, because there is not enough space below it.
(5) Move one of the extension buttons in the menu to another place


What is the expected result?
The Menu should stay fully expanded to the left of the Wrench Button

What happens instead?
The menu jumps below the Wrench Button and shrinks with the scroll arrows at top/bottom.

(The shrinked menu is normally the standard behavior on Mac, because menus always open below the buttons. But since we open the menus actually to the left/right of the button, when the space below the buttons isn't enough, the menu should not jump below it.)

Thanks :-)
Mehmet

 
Menu jumping issue.mov
2.4 MB View Download
Labels: M-68 MacViews-Browser Target-68
Owner: spqc...@chromium.org
Status: Assigned (was: Untriaged)
spqchan: ptal? :)
Cc: spqc...@chromium.org
Owner: tnijssen@google.com

Comment 3 by tnijssen@google.com, May 24 2018

I can't reproduce the bug. The menu stays in the same location when I drag the extensions around.

Comment 4 by meh...@chromium.org, May 24 2018

Hey tnijssen@,

Thanks for looking into this issue. Hmm... I still can reproduce it with in latest Canary :(

A screencast is attached.

screencast.mov
919 KB View Download

Comment 5 by tnijssen@google.com, May 31 2018

Hi mehmet@,

I recorded the behavior of the Menu. I'm running version 68.0.3440.7.

Interestingly enough, the Menu opens above the Wrench button and it stays put as I move around the extensions.

I tried moving the browser window around to try to get the menu to open to the left to no avail.
screencast.mov
1.7 MB View Download
Hmmm.... maybe it depends on the screen size, if the menu appears to the left side. I am using a MacBookAir 11".


It does depend on screen size. The bug appears on my MacBook Pro 15". Now that I can reproduce the bug, I can work on it too :)
Thanks for confirming it and thanks for looking into this issue :-)
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 7 2018

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

commit 32795d8edb314ef465c67d740653996a3f764596
Author: Tessa Nijssen <tnijssen@google.com>
Date: Thu Jun 07 18:17:24 2018

[Views] Set Correct Menu Orientation

Toolkit-views menus positioned with POSITION_BEST_FIT are be
positioned to the side of the anchor when the menu height is greater
than ~50% of the screen. Currently in this situation, the "actual"
position of the menu is incorrectly recorded as POSITION_BELOW_BOUNDS.
If a menu delegate invokes MenuChildrenChanged() and recalculates the
menu bounds, this can cause the menu to reposition itself under
the anchor rather than remaining to the side.

To fix, record the "actual" position as POSITION_BEST_FIT in this
situation.

Bug:  840919 
Change-Id: I4102e014c058b2f89d5bc38b7b4371c010367119
Reviewed-on: https://chromium-review.googlesource.com/1087516
Commit-Queue: Tessa Nijssen <tnijssen@google.com>
Reviewed-by: Sarah Chan <spqchan@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565352}
[modify] https://crrev.com/32795d8edb314ef465c67d740653996a3f764596/ui/views/controls/menu/menu_controller.cc

Status: Fixed (was: Assigned)
Thanks tnijssen@.

WorksForMe now in Chrome Canary 69.0.3453.3.

Sign in to add a comment