New issue
Advanced search Search tips

Issue 616650 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

MacViews: Ctrl+LeftClick in a views::TextField should show context menu

Project Member Reported by tapted@chromium.org, Jun 2 2016

Issue description

Chrome Version       : 53.0.2754.0
OS Version: OS X 10.11.5

Currently it's only shown on a right-click, but Mac has this Ctrl+LeftClick-is-a-right-click thing carried over from last millennium when Mac mice only had one button.

What steps will reproduce the problem?
1. (e.g.) chrome://flags/#mac-views-native-dialogs, show bookmark bubble
2. Ctrl+LeftClick the text field

What is the expected result?

Should show a context menu


What happens instead of that?

Doesn't


Started: https://codereview.chromium.org/2025943003/
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 3 2016

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

commit 44b884f03bc32c8e891e80122e07d51595dd4b73
Author: tapted <tapted@chromium.org>
Date: Fri Jun 03 02:54:15 2016

MacViews: Treat Ctrl+LeftClick as RightClick on Mac.

Alters EventFlagsFromNSEventWithModifiers to check for Ctrl in the
NSEvent modifierFlags and make a left click a right click. Removes the
Ctrl modifier in such cases.

Mac lets you disable "secondary click" completely in Trackpad settings,
which leaves Ctrl+Click as the only way to "right"-click, so we should
support this. There isn't a system setting that disables Ctrl+Click.

Apart from MacViews, EventFlagsFromNSEventWithModifiers is currently
used by the browser back button and (when DevTools is attached) the
reload button, but only for feeding modifiers to
ui::MenuModel::ActivatedAt(index, flags). They use
ui::DispositionFromEventFlags(..) which only cares about middle-clicks
(and -for Mac- the Command modifier, which isn't altered by this CL) so
there's no behaviour change for Cocoa with this CL.

The browser back button itself (a ClickHoldButtonCell) still doesn't
respect Ctrl+LeftClick ( http://crbug.com/616357 ). But that's orthogonal.

BUG= 616650 

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

[modify] https://crrev.com/44b884f03bc32c8e891e80122e07d51595dd4b73/ui/events/cocoa/cocoa_event_utils.mm
[modify] https://crrev.com/44b884f03bc32c8e891e80122e07d51595dd4b73/ui/events/cocoa/events_mac_unittest.mm

Status: Fixed (was: Started)

Sign in to add a comment