New issue
Advanced search Search tips

Issue 787320 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug
Team-Security-UX

Blocking:
issue 603386
issue 782629



Sign in to add a comment

Mac/Harmony: Page Info bubble (and content settings bubbles) reappear when clicking their button a second time

Project Member Reported by tapted@chromium.org, Nov 21 2017

Issue description

Chrome Version       : 64.0.3269.3
OS Version: OS X 10.12.6

With chrome://flags#secondary-ui-md enabled

What steps will reproduce the problem?
1. Go to, e.g., www.google.com, Click Page Info button (padlock icon)
2. Press the button again

What is the expected result?

Page info bubble should dismiss.


What happens instead of that?

Bubble disappears on mouse down, reappears on mouse up.


Same thing happens for content settings bubbles. E.g.,
1. Go to https://permission.site
2. Click location, block
3. Click the icon on the right of the omnibox next to the bookmark star
4. Click the icon again


A lot of bubbles handle this case by checking for some global to be set or not, but I think we can do better than globals. Globals are gross.

Also it doesn't work properly for draggable buttons for PageInfo anyway. Most bubbles appear on mouse down, but page info is a draggable button so it must appear on mouse up instead. But the mouse down also dismisses the bubble and clears the global.

The only reason it works on Cocoa is because the bubble fades out, and the duration of the animation is longer than it takes for the button to enter "dragging mode", so the global is never cleared by the time a non-dragging mouse-up-while-active is received.

Suggested fix for this - https://chromium-review.googlesource.com/#/c/chromium/src/+/781279
 

Comment 1 by tapted@chromium.org, Nov 23 2017

Blocking: 782629
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 23 2017

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

commit 148bac00cd715be374f0a24d9cdb27e2cbf5e959
Author: Trent Apted <tapted@chromium.org>
Date: Thu Nov 23 06:26:56 2017

Allow location bar decorations to suppress "press" events on active buttons.

Currently, views PageInfo and Content Settings bubbles on Mac "reappear"
when clicking their location bar decoration twice, rather than toggling.

Most browser "buttons" activate a bubble activate on mouse down, and act as
a toggle. To detect whether a press should activate or dismiss, the
current approach is usually to check a global pointer. That's not great.

But also it doesn't work for bubbles that activate on mouse up. This
includes any "draggable" button, since the mouse down might be to start
a drag so doesn't trigger the button. The mouse down will still dismiss
the bubble, due to clicking "outside" it, and so the global pointer will
be cleared before the corresponding mouse "up" is observed.

Resolve this at a framwork level by tracking the active state of the
button in mouse down, and allowing a LocationBarDecoration to specify
whether it should activate always, or only when moving into an active
state.

Bug:  787320 
Change-Id: I08caf5b7657e148e97393e6e0d593b29b6e54c09
Reviewed-on: https://chromium-review.googlesource.com/781279
Commit-Queue: Trent Apted <tapted@chromium.org>
Reviewed-by: Sarah Chan <spqchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518865}
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration_unittest.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/page_info_bubble_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/page_info_bubble_decoration.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/star_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/translate_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/translate_decoration.mm
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h
[modify] https://crrev.com/148bac00cd715be374f0a24d9cdb27e2cbf5e959/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm

Status: Fixed (was: Started)

Sign in to add a comment