Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug that mousedown without mouseup in a frame disturbs click ev…
…ent in another frame Fix a bug that mousedown without mouseup in a frame disturbs click event in another frame https://bugs.webkit.org/show_bug.cgi?id=119305 Reviewed by Ryosuke Niwa. Merge - https://src.chromium.org/viewvc/blink?revision=154698&view=revision 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::handleMousePressEvent wrongly continues to hold a node for the first click, and it prevents hit-testing for the second click. We should always clear m_capturingMouseEventsElement in mousedown handling code. * Source/WebCore/page/EventHandler.cpp: (EventHandler::handleMousePressEvent): Add condition to return "nullptr" * LayoutTests/fast/events/click-after-mousedown-cancel.html: Add Test Case * LayoutTests/fast/events/click-after-mousedown-cancel-expected.txt: Add Test Case Expectation * LayoutTests/platform/ios/TestExpectations: Updated to skip added test on iOS due to lack of mouse event support Canonical link: https://commits.webkit.org/258055@main
- Loading branch information
Showing 4 changed files with 46 additions and 0 deletions.