New issue
Advanced search Search tips

Issue 711320 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

inspect element selector does not suppress mouseup event (unlike click and mousedown)

Reported by elan7aa...@gmail.com, Apr 13 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3025.0 Safari/537.36

Steps to reproduce the problem:
1. create a div
2. add a listener to its mouseup event
3. try to inspect it, using the "Select an element in the page to inspect it" icon of the DevTools

What is the expected behavior?
mouseup event is not fired

What went wrong?
mouseup event is fired

Did this work before? N/A 

Chrome version: 58.0.3025.0  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 25.0 r0

No problem with "click" and "mousedown", only with "mouseup".

Attached is a test HTML with 3 divs with click, mousedown and mouseup listeners added  respectively

Practical meaning: when mouseup listener removes the element in question, element is impossible to select for inspection.
 
test.html
375 bytes View Download
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 17 2017

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

commit 88ebc67e440fa500369a453b32ac5f32a7dcbc64
Author: dgozman <dgozman@chromium.org>
Date: Mon Apr 17 19:42:37 2017

[DevTools] Swallow mouse up in inspect mode

Currently, we dispatch mouseup to the page after selecting an element in inspect
mode. This could trigger any incovenient side-effects including removal of
inspected element. Swallowing mouseup fixes that problem.

This is not a 100% solution: overlay disappears if user holds mouse
for 2 seconds, and mouseup still gets to the page. That's a minor problem, so
this solution is good enough.

BUG= 711320 

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

[modify] https://crrev.com/88ebc67e440fa500369a453b32ac5f32a7dcbc64/third_party/WebKit/Source/web/InspectorOverlay.cpp
[modify] https://crrev.com/88ebc67e440fa500369a453b32ac5f32a7dcbc64/third_party/WebKit/Source/web/InspectorOverlay.h

Status: Fixed (was: Assigned)

Sign in to add a comment