Mouse right-button should call View.showContextMenu(x, y) |
||||||||
Issue descriptionChrome Version : 56.0.2924.76 OS Version: M+ What steps will reproduce the problem? 1. Attach bluetooth mouse to Android device. 2. Launch Chrome 3. Press right-button on link. What is the expected result? Show context menu. What happens instead of that? Click through the link. Please provide any additional information below. Attach a screenshot if possible. Originally filed as b/34868168.
,
Feb 2 2017
,
Jun 16 2017
I tried a Samsung DEX desktop-for-phone adapter today and Samsung has implemented a desktop-style bottom-right-flyout context menu on right click for that environment. Samsung Internet supports it, and Samsung Email app has hooked it up to WebView in some manner already (but it doesn't work in Chrome or GMail). Samsung has developer documentation for the DEX at http://developer.samsung.com/samsung-dex/modify which says we can call View.showContextMenu(x, y) to display it. This is a standard Android API added in API level 24 (Android N), it looks like no proprietary Samsung APIs are needed. Then we can add actions to a standard Android ContextMenu object. I presume it will show up as a fullscreen modal on a phone as usual, but as a positioned menu on Samsung DEX.
,
Aug 18 2017
,
Sep 6 2017
,
Sep 17 2017
,
Sep 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c367d397359a85aa9986e8848daa119435191282 commit c367d397359a85aa9986e8848daa119435191282 Author: Chris Blume <cblume@google.com> Date: Mon Sep 18 19:59:01 2017 Right mouse click positions context menu On Android API v24 (Android N), an API is available to position the top left of a context menu. Check if this API is available and position the context menu if possible. BUG= 687787 Change-Id: I89cdea9c98c4bac8c3f998533f93dbd5bcf47974 Reviewed-on: https://chromium-review.googlesource.com/670073 Commit-Queue: Chris Blume <cblume@google.com> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#502653} [modify] https://crrev.com/c367d397359a85aa9986e8848daa119435191282/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java
,
Sep 18 2017
,
Oct 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/045e64ecbf31137d961e4027abf9a8ec105eb8f9 commit 045e64ecbf31137d961e4027abf9a8ec105eb8f9 Author: Chris Blume <cblume@chromium.org> Date: Wed Oct 04 00:38:56 2017 Revert "Right mouse click positions context menu" This reverts commit c367d397359a85aa9986e8848daa119435191282. Reason for revert: There is an A/B test where this isn't applied. The A/B test should mirror this behavior. Additionally, rather than always positioning menus, we should continue to use a modal dialog for anything other than mouse clicks (such as long presses). Because the behavior is not currently consistent and what we want, let's revert before the M63 branch. Original change's description: > Right mouse click positions context menu > > On Android API v24 (Android N), an API is available to position the top > left of a context menu. > > Check if this API is available and position the context menu if > possible. > > BUG= 687787 > > Change-Id: I89cdea9c98c4bac8c3f998533f93dbd5bcf47974 > Reviewed-on: https://chromium-review.googlesource.com/670073 > Commit-Queue: Chris Blume <cblume@google.com> > Reviewed-by: Ted Choc <tedchoc@chromium.org> > Cr-Commit-Position: refs/heads/master@{#502653} TBR=tedchoc@chromium.org,cblume@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 687787 Change-Id: Ib1aa5d59ddae0b0f7918ae4729ff8f38dce01d89 Reviewed-on: https://chromium-review.googlesource.com/699426 Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Commit-Queue: Chris Blume <cblume@chromium.org> Cr-Commit-Position: refs/heads/master@{#506251} [modify] https://crrev.com/045e64ecbf31137d961e4027abf9a8ec105eb8f9/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java
,
Oct 17 2017
Reopening because we reverted. Relanding this requires 2 updates: * Only position the dialog when the event source was a right mouse click (and leave the long-touch unpositioned) * Update TabularContextMenuUi.java to also use the positioning code.
,
Oct 20 2017
There are two patches out to address this again [1][2]. Also, along the way it seems we broke the ability to resize the window on DeX. I filed a bug for that as well [3]. [1] https://chromium-review.googlesource.com/c/chromium/src/+/731507 [2] https://chromium-review.googlesource.com/c/chromium/src/+/731509 [3] https://bugs.chromium.org/p/chromium/issues/detail?id=777012
,
Oct 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d2761248eed2ec39a89fbf61de7d174a718aa023 commit d2761248eed2ec39a89fbf61de7d174a718aa023 Author: Chris Blume <cblume@google.com> Date: Mon Oct 30 17:44:07 2017 Pipe source type into ContextMenuParams Sometimes, an Android device is meant to behave like a desktop. For example, when an external monitor and mouse are connected. When this happens, things like a right mouse click should show a context menu positioned at the click location (rather than showing a long-press modal dialog). In order for this to happen, we need to pipe the source type into ContextMenuParams. This allows us to make the decision of how to display the ContextMenu later in the pipeline. BUG= 687787 Change-Id: Ia60d65f132e1ea671c3929bd623aae900d871867 Reviewed-on: https://chromium-review.googlesource.com/731507 Commit-Queue: Chris Blume <cblume@google.com> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#512529} [modify] https://crrev.com/d2761248eed2ec39a89fbf61de7d174a718aa023/chrome/android/java/src/org/chromium/chrome/browser/browseractions/BrowserActionActivity.java [modify] https://crrev.com/d2761248eed2ec39a89fbf61de7d174a718aa023/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuParams.java [modify] https://crrev.com/d2761248eed2ec39a89fbf61de7d174a718aa023/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/TabularContextMenuUiTest.java [modify] https://crrev.com/d2761248eed2ec39a89fbf61de7d174a718aa023/chrome/android/junit/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulatorTest.java [modify] https://crrev.com/d2761248eed2ec39a89fbf61de7d174a718aa023/chrome/browser/ui/android/context_menu_helper.cc
,
Oct 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ef660c265fdfb623fe00a5d4479cd2234ec1fffa commit ef660c265fdfb623fe00a5d4479cd2234ec1fffa Author: Chris Blume <cblume@google.com> Date: Tue Oct 31 20:50:46 2017 Show correct context menu given source type Sometimes, an Android device is meant to behave like a desktop. For example, when an external monitor and mouse are connected. When this happens, things like a right mouse click should show a context menu positioned at the click location (rather than showing a long-press modal dialog). BUG= 687787 Change-Id: I8d42d248f69ee3e52b65ce93c5c2a5ce58786be4 Reviewed-on: https://chromium-review.googlesource.com/731509 Commit-Queue: Chris Blume <cblume@chromium.org> Reviewed-by: Ted Choc <tedchoc@chromium.org> Cr-Commit-Position: refs/heads/master@{#512947} [modify] https://crrev.com/ef660c265fdfb623fe00a5d4479cd2234ec1fffa/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java
,
Nov 2 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by aelias@chromium.org
, Feb 2 2017Labels: -OS-Linux
Owner: aelias@chromium.org
Status: Assigned (was: Available)