New issue
Advanced search Search tips

Issue 682709 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Inconsistent default event handler calls in Blink between mouse/pointer events

Project Member Reported by mustaq@chromium.org, Jan 19 2017

Issue description

This applies only to move/over/out events.

Steps:
- Add a log output with event type in TextControlInnerEditorElement::defaultEventHandler().
- Build & open: http://output.jsbin.com/doqefum
- Hover mouse pointer over the textbox.

We expect one single handler call for pointerover and one for mouseover. But mouseover gets at least two calls.

Observations:
- This is not a pointer event bug. Disabling PointerEvents still causes these double calls.
- Direct event dispatch (Node::dispatchMouseEvent) is not used here.
 

Comment 1 by mustaq@chromium.org, Jan 19 2017

Description: Show this description

Comment 2 by mustaq@chromium.org, Jan 19 2017

Cc: mustaq@chromium.org

Comment 3 by mustaq@chromium.org, Jan 19 2017

Cc: dtapu...@chromium.org
Status: Available (was: Unconfirmed)

Comment 4 by mustaq@chromium.org, Jan 19 2017

Components: Blink>Input
Labels: Hotlist-Input-Dev
Project Member

Comment 5 by sheriffbot@chromium.org, Feb 12 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Mustaq, do you still see this issue?

Comment 7 by mustaq@chromium.org, Feb 22 2018

Owner: mustaq@chromium.org
Status: Assigned (was: Untriaged)
Still an issue.

In fact all events except for pointer events get double calls, here is a sample log where I moved the mouse over the text box, clicked and moved it away:
[1:1:0222/151104.095555:ERROR:TextControlInnerElements.cpp(112)] pointerover
[1:1:0222/151104.096595:ERROR:TextControlInnerElements.cpp(112)] mouseover
[1:1:0222/151104.096791:ERROR:TextControlInnerElements.cpp(112)] mouseover
[1:1:0222/151104.097028:ERROR:TextControlInnerElements.cpp(112)] pointermove
[1:1:0222/151104.097581:ERROR:TextControlInnerElements.cpp(112)] mousemove
[1:1:0222/151104.097815:ERROR:TextControlInnerElements.cpp(112)] mousemove
[1:1:0222/151104.114471:ERROR:TextControlInnerElements.cpp(112)] pointermove
[1:1:0222/151104.115057:ERROR:TextControlInnerElements.cpp(112)] mousemove
[1:1:0222/151104.115266:ERROR:TextControlInnerElements.cpp(112)] mousemove
[1:1:0222/151105.667663:ERROR:TextControlInnerElements.cpp(112)] pointerdown
[1:1:0222/151105.668162:ERROR:TextControlInnerElements.cpp(112)] mousedown
[1:1:0222/151105.668426:ERROR:TextControlInnerElements.cpp(112)] mousedown
[1:1:0222/151105.675970:ERROR:TextControlInnerElements.cpp(112)] selectstart
[1:1:0222/151105.822352:ERROR:TextControlInnerElements.cpp(112)] pointerup
[1:1:0222/151105.822963:ERROR:TextControlInnerElements.cpp(112)] mouseup
[1:1:0222/151105.823379:ERROR:TextControlInnerElements.cpp(112)] mouseup
[1:1:0222/151105.824021:ERROR:TextControlInnerElements.cpp(112)] click
[1:1:0222/151105.824366:ERROR:TextControlInnerElements.cpp(112)] DOMActivate
[1:1:0222/151105.824637:ERROR:TextControlInnerElements.cpp(112)] click
[1:1:0222/151105.824964:ERROR:TextControlInnerElements.cpp(112)] DOMActivate
[1:1:0222/151127.432665:ERROR:TextControlInnerElements.cpp(112)] pointermove
[1:1:0222/151127.433897:ERROR:TextControlInnerElements.cpp(112)] mousemove
[1:1:0222/151127.434202:ERROR:TextControlInnerElements.cpp(112)] mousemove
[1:1:0222/151127.442810:ERROR:TextControlInnerElements.cpp(112)] pointerout
[1:1:0222/151127.444040:ERROR:TextControlInnerElements.cpp(112)] mouseout
[1:1:0222/151127.444317:ERROR:TextControlInnerElements.cpp(112)] mouseout

Comment 8 by mustaq@chromium.org, Feb 22 2018

Here is the root cause: TextFieldInputType::ForwardEvent forwards selected events here which drops pointer events but not mouse* events or click:
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp?rcl=14f40e48d6fdc828d9d4c5c262846a265596fc3e&l=225

Call stack for pointer* and first mouse*/click events:
TextControlInnerEditorElement::DefaultEventHandler()
EventDispatcher::DispatchEventPostProcess()

Call stack for second mouse*/click events:
TextControlInnerEditorElement::DefaultEventHandler()
TextControlElement::ForwardEvent()
TextFieldInputType::ForwardEvent()
HTMLInputElement::DefaultEventHandler()
EventDispatcher::DispatchEventPostProcess()

Comment 9 by mustaq@chromium.org, Feb 23 2018

Status: WontFix (was: Assigned)
Not sure why TextFieldInputType::ForwardEvent only cares about certain types of events, the code is at least 4 years old.

Marking as WAI, doesn't worth the effort to dig further.

Sign in to add a comment