New issue
Advanced search Search tips

Issue 833856 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 27
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
MacViewsBrowser-RS


Sign in to add a comment

MacViews menus should fade out when you click away from them

Project Member Reported by sdy@chromium.org, Apr 17 2018

Issue description

Chrome Version: 68.0.3398.0
OS: macOS 10.13.4

What steps will reproduce the problem?
(1) Open a menu in MacViews browser mode, like the app menu.
(2) Click somewhere else in the window (not on a menu item).

What is the expected result?
The menu should fade away (like Cocoa menus).

What happens instead?
The menu disappears instantly.
 
menu_fade_demo.mp4
84.6 KB View Download

Comment 1 by gov...@chromium.org, Apr 25 2018

Pls mark the bug as fixed if CL is landed in trunk and nothing else is pending. Thank you.
Labels: -Target-68 Target-69
Labels: MacViews-Release
Labels: -MacViews-Release
Labels: -M-68 Group-Menus
Labels: M-68
Labels: -M-68 M-69
Labels: -M-69 -Target-69 Target-70 M-70
MacViews triage: I'll try to work on this in M70. We already do fade the menus for acceptance, so it shouldn't be too hard.
I see a fade out in 70.0.3523.0
I'm not seeing it. Are we doing something different?
crbug_833856_still_no_fade.mp4
198 KB View Download
They fade when you accept an item, but not when you dismiss the menu with an outside click.
Labels: -Target-70 -M-70 Target-71 M-71
I looked at how to implement this. We can reuse much of MenuClosureAnimationMac (yay!) by adding support to it for having no target MenuItemView* and taking a SubmenuView* in that situation. The logical place to do this seems to be MenuController::Cancel(), but there are many ways to reach that point and not all of them have a SubmenuView available.  Instead probably the best place to do this is in MenuController::RepostEventAndCancel().

Bumping the target to 71.
Project Member

Comment 14 by bugdroid1@chromium.org, Sep 27

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

commit 951a112960520a46111a0d7dda53a405648d0193
Author: Elly Fong-Jones <ellyjones@chromium.org>
Date: Thu Sep 27 15:51:17 2018

macviews: run menu closure animation for dismissals by clicking outside

This change:
1) Adds support to MenuClosureAnimationMac for animating menu closure without
   animating selecting an item;
2) Has MenuController use MenuClosureAnimationMac to animate cancels caused by
   outside clicks

Bug:  833856 
Change-Id: I9743b396798e4b125c038b35decc9aceb083926d
Reviewed-on: https://chromium-review.googlesource.com/1231837
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594738}
[modify] https://crrev.com/951a112960520a46111a0d7dda53a405648d0193/chrome/browser/ui/views/menu_model_adapter_test.cc
[modify] https://crrev.com/951a112960520a46111a0d7dda53a405648d0193/ui/views/controls/menu/menu_closure_animation_mac.h
[modify] https://crrev.com/951a112960520a46111a0d7dda53a405648d0193/ui/views/controls/menu/menu_closure_animation_mac.mm
[modify] https://crrev.com/951a112960520a46111a0d7dda53a405648d0193/ui/views/controls/menu/menu_controller.cc
[modify] https://crrev.com/951a112960520a46111a0d7dda53a405648d0193/ui/views/controls/menu/menu_controller_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment