WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
272354
[WPE] Right mouse button click stops further mouse button processing
https://bugs.webkit.org/show_bug.cgi?id=272354
Summary
[WPE] Right mouse button click stops further mouse button processing
Adrian Perez
Reported
2024-04-08 14:40:05 PDT
Steps to reproduce: - Open any web page in a WPE browser that has code to handle the right mouse button. For example Cog with this patch:
https://github.com/Igalia/cog/pull/704/
- Right click anywhere on the page - Try to click elsewhere. Outcome: Mouse buttons stop working. WebKit is not hung because other things like keyboard input or mouse-wheel scroll work fine. Expected: Mouse clicks continue to work after using the right mouse button.
Attachments
Add WPE context menu support
(7.70 KB, patch)
2024-07-02 15:10 PDT
,
contact
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Add WPE context menu support
(7.70 KB, patch)
2024-10-21 20:40 PDT
,
contact
no flags
Details
Formatted Diff
Diff
Add touch context menu support
(8.25 KB, patch)
2024-10-22 16:51 PDT
,
contact
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
contact
Comment 1
2024-06-22 17:18:55 PDT
Some cursory research seems to suggest this is related to lack of context menu handling. My debug log is full of the following messages after right-clicking in cog: ``` WebPageProxy::processNextQueuedMouseEvent: Waiting for context menu to show. ``` Looking at the code that emits this event, it seems like it will ignore all mouse events until a context menu is opened:
https://github.com/WebKit/WebKit/blob/b7c62d71ee8f97b70918f9c3b0882e0dd705e1a6/Source/WebKit/UIProcess/WebPageProxy.cpp#L3593-L3597
contact
Comment 2
2024-06-28 19:55:13 PDT
Turns out WPE WebKit had a context menu stub added in the past when some cleanup was done on the other backends, but never actually had a functioning context menu implementation from what I can tell. So this issue basically boils down to adding context menu support for WPE WebKit and as a result right-click should get fixed since it will properly emit the context menu signal.
contact
Comment 3
2024-07-02 15:10:52 PDT
Created
attachment 471799
[details]
Add WPE context menu support I've added a patch that seems to fix this bug and add context menu support based on some basic testing. Since it's mostly based on trial and error, I'd expect this to be pretty far from mergeable, so I'd appreciate any feedback. I wasn't able to submit it officially since the WebKit git script asked for GitHub account access, which I'm not willing to give it access to. Details about the patch in question: ``` This replaces the existing context menu stub implementation with a minimal version which emits the WebView's context menu signal. This also resolves a bug where all mouse input would break after right-clicking, since the stub implementation was waiting for the context menu to be opened before processing new mouse events. The `context-menu-dismissed` signal is removed from the WPE backend in a breaking change, since dismissal is handled by the consumer of the API. Fixes
https://bugs.webkit.org/show_bug.cgi?id=265637
. ```
contact
Comment 4
2024-10-21 20:40:56 PDT
Created
attachment 473010
[details]
Add WPE context menu support This replaces the existing context menu stub implementation with a minimal version which emits the WebView's context menu signal. This also resolves a bug where all mouse input would break after right-clicking, since the stub implementation was waiting for the context menu to be opened before processing new mouse events. The `context-menu-dismissed` signal is removed from the WPE backend in a breaking change, since dismissal is handled by the consumer of the API. Fixes
https://bugs.webkit.org/show_bug.cgi?id=272354
.
contact
Comment 5
2024-10-22 16:51:02 PDT
Created
attachment 473013
[details]
Add touch context menu support This patch uses the new WPE Platform's gesture controller to send synthetic right-click events whenever holding a touch point in position for a second. The synthetic right-click event will then automatically generate a context menu event for interested clients.
klee
Comment 6
2025-11-23 20:54:31 PST
Pull request:
https://github.com/WebKit/WebKit/pull/54398
klee
Comment 7
2025-11-23 21:38:26 PST
Due to the lack of a context menu implementation in the WPE port, the event handling logic became stuck after a right-click, causing all subsequent mouse events to be ignored. I have updated the code so that the logic continues properly after a right-click, and mouse events now work as expected. We can close this issue, but the context menu APIs for WPE still need to be implemented in future patches. This is the initial PR toward exposing a public context-menu API in the WPE port. Follow-up patches will provide APIs for delivering hit-test results and context-menu items to the WPE application.
EWS
Comment 8
2025-11-24 16:10:32 PST
Committed
303518@main
(d811b2767c10): <
https://commits.webkit.org/303518@main
> Reviewed commits have been landed. Closing PR #54398 and removing active labels.
EWS
Comment 9
2025-12-19 22:56:57 PST
Committed
304810@main
(8a4ffd46ddaa): <
https://commits.webkit.org/304810@main
> Reviewed commits have been landed. Closing PR #55671 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug