New issue
Advanced search Search tips

Issue 824422 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

[MacViews] Tab modal dialog sheets can be moved around the browser window

Project Member Reported by mahmadi@chromium.org, Mar 21 2018

Issue description

Chrome Version: 65.0.3325.162
OS: Mac

What steps will reproduce the problem?
(1) Go to https://rsolomakhin.github.io/pr/
(2) Press the Buy button to trigger the PaymentRequest UI

What is the expected result?

Should not be able to move the UI sheet.

What happens instead?

Click and hold toward the top of the UI sheet and move it around.


 
Labels: -Pri-3 OS-Mac Pri-2
Status: Assigned (was: Untriaged)
Good find!

Comment 2 by ma...@chromium.org, Mar 21 2018

Labels: -Pri-2 M-67 Pri-1
What! You blew my mind. 
This is pretty funny! Doesn't repro on Linux so it's probably Mac specific. We do modal popups as native windows on Mac AFAIK, so that would explain the discrepancy.

I'll look into it.

Comment 4 by ma...@chromium.org, Mar 21 2018

Cc: tapted@chromium.org ellyjo...@chromium.org
Components: Internals>Views>Desktop
Summary: [MacViews] Tab modal dialog sheets can be moved around the browser window (was: Payment Request UI sheet can be moved around the browser window)
Reproed with the Autofill CVC unmask dialog as well (https://rsolomakhin.github.io/autofill, then autofill a credit card from Google Payments to see dialog). 

Adjusting title to say that all constrained_window::ShowWebModalDialogViews on Mac may be affected. 

Comment 5 by tapted@chromium.org, Mar 22 2018

Cc: anthonyvd@chromium.org
Owner: tapted@chromium.org
Status: Started (was: Assigned)
In part this is due to  Issue 792528  ("constrained windows"), but for Mac it's particularly weird that window-modal sheets can be dragged around.

OTOH, ChromeOS has some window-modal dialogs that are centered in the window (not "constrained" to a tab, and not a sheet). So this probably needs a fix different to the one for  Issue 792528  (which doesn't seem to manifest for Windows any more?)

I dunno what's going on with Windows, but the fix for Mac is simple:

https://chromium-review.googlesource.com/#/c/chromium/src/+/974810
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 23 2018

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

commit 7ccf96e6fc17d994f4d5b654d209a2af64cfc922
Author: Trent Apted <tapted@chromium.org>
Date: Fri Mar 23 00:09:52 2018

MacViews: Disallow dragging of modals.

views::BubbleFrameView::NonClientHitTest() dutifully returns HTCAPTION
for points that hit the dialog title on non-bubble dialogs. This is
interpreted as a draggable region. But everyone freaks out when modal
windows are draggable, so disallow it.

Other platforms may still want window-modals to be draggable. But on
Mac these are sheets and dragging those is especially trippy.

Bug:  824422 ,  792528 ,  500783 
Change-Id: I2b9802e53cad7e762fc74d8b4ac73c4d82d067ba
Reviewed-on: https://chromium-review.googlesource.com/974810
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545298}
[modify] https://crrev.com/7ccf96e6fc17d994f4d5b654d209a2af64cfc922/ui/views/cocoa/bridged_native_widget.mm

Comment 7 by tapted@chromium.org, Mar 26 2018

Status: Fixed (was: Started)

Sign in to add a comment