New issue
Advanced search Search tips

Issue 748480 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

onContextMenu event fired too early on a touch device during long tap

Reported by tomas.ba...@gmail.com, Jul 25 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce the problem:
1. navigate to https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_oncontextmenu_html
2. long tap on the yellow rectangle
3. the "You right-clicked inside div!" text appears before the finger is released from the screen and before contextmenu opens

What is the expected behavior?
the onContextMenu event should fire at the very same time the contextmenu opens.

What went wrong?
onContextMenu event is fired after cca 500ms during long-tapping on the screen, however the contextMenu itself opens after the user stops the long-tap (releases his/her finger)

Did this work before? No 

Chrome version: 59.0.3071.115  Channel: stable
OS Version: 10.0
Flash Version: 

works both in Firefox 54 and IE11
 
Cc: dtapu...@chromium.org mustaq@chromium.org nzolghadr@chromium.org
Components: -Blink Blink>Input
Labels: -Pri-2 Hotlist-Input-Dev Pri-3
Owner: eirage@chromium.org
Status: Assigned (was: Unconfirmed)
Can definitely reproduce this on Windows.

nzolghadr@, mustaq@ do you agree this is a little odd?

Comment 2 by mustaq@chromium.org, Jul 25 2017

I agree that "contextmenu" event should fire after tap-release.  Edge also works that way.
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 4 2018

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

commit aa4f1763a92c95858bedc81e22d3c19f122c2c5b
Author: Ella Ge <eirage@chromium.org>
Date: Wed Apr 04 00:05:58 2018

Windows contextmenu events should fire on long tap

On Windows, we send context menu when long press gesture is released.
Previously context menu event is sent on long press gesture. On Windows,
context menu was held in last_context_menu_params_ and wait for next
GestureTap event.

In this Cl, let contextmenu events send on GestureLongTap on windows.
So there is no need to store the last_context_menu_params_ for windows,
remove related code.

Because we still want to handle text selection on longpress but only
move context menu event to long tap, remove setting caret on long tap
because that will break text selection quick menu on windows.

Bug:  748480 
Change-Id: If5372e30d08473dfeded0fe133f32f7d6ca43328
Reviewed-on: https://chromium-review.googlesource.com/960964
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Navid Zolghadr <nzolghadr@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547877}
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/browser/renderer_host/render_widget_host_view_event_handler.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/browser/renderer_host/render_widget_host_view_event_handler.h
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/browser/web_contents/web_contents_view_aura.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/public/test/browser_test_utils.cc
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/content/public/test/browser_test_utils.h
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/third_party/WebKit/LayoutTests/fast/events/mouse-event-buttons-attribute-expected.txt
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-long-press.html
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-mouse.html
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/third_party/WebKit/LayoutTests/fast/events/touch/gesture/context-menu-on-long-press-expected.txt
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/third_party/WebKit/LayoutTests/fast/events/touch/gesture/context-menu-on-long-press.html
[modify] https://crrev.com/aa4f1763a92c95858bedc81e22d3c19f122c2c5b/third_party/WebKit/Source/core/input/GestureManager.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment