Bug 119305 - Fix a bug that mousedown without mouseup in a frame disturbs click event in another frame
Summary: Fix a bug that mousedown without mouseup in a frame disturbs click event in a...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate, InRadar
Depends on:
Blocks:
 
Reported: 2013-07-30 20:29 PDT by Ryosuke Niwa
Modified: 2022-12-17 14:57 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-07-30 20:29:22 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/01502bee2013aeb0c5b300d4b9bb00ba1e45e596

If a mouse button is clicked but mouseup event for it is not dispatched
(it happens frequently because of context menus) and mousedown in
another frame is default-prevented, 'click' event for the latter mouse
click is not dispatched.

EventHandler::m_capturingMouseEventsNode wrongly continues to hold a node
for the first click, and it prevents hit-testing for the second click. We
should alwyas clear m_capturingMouseEventsNode in mousedown handling code.
Comment 1 Ahmad Saleem 2022-09-24 02:15:25 PDT
This is still something can be implemented:

https://github.com/WebKit/WebKit/blob/2ef8bf040a9db8c0af836f5a92916e087e9b9e16/Source/WebCore/page/EventHandler.cpp#L1711

but I don't know alternative names of:

m_eventHandlerWillResetCapturingMouseEventsNode -> can't figure out

m_capturingMouseEventsNode -> could be m_capturingMouseEventsElement

Plus I was not able to test the attached testcase because it requires eventSender, which might be only possible in EWS. Thanks!
Comment 2 Ahmad Saleem 2022-09-24 02:17:23 PDT
(In reply to Ahmad Saleem from comment #1)
> This is still something can be implemented:
> 
> https://github.com/WebKit/WebKit/blob/
> 2ef8bf040a9db8c0af836f5a92916e087e9b9e16/Source/WebCore/page/EventHandler.
> cpp#L1711
> 
> but I don't know alternative names of:
> 
> m_eventHandlerWillResetCapturingMouseEventsNode -> can't figure out
> 
> m_capturingMouseEventsNode -> could be m_capturingMouseEventsElement
> 
> Plus I was not able to test the attached testcase because it requires
> eventSender, which might be only possible in EWS. Thanks!

We also have "clearLatchedState", we can call it as well like:

if (xx)
return clearLatchedState;

xx -> m_eventHandlerWillResetCapturingMouseEventsNode (still not clear alternative in Webkit).
Comment 3 EWS 2022-12-17 14:56:16 PST
Committed 258055@main (c2dd7ba98908): <https://commits.webkit.org/258055@main>

Reviewed commits have been landed. Closing PR #7811 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2022-12-17 14:57:16 PST
<rdar://problem/103484632>