After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608491 - Context menu does not appear when invoked from keyboard
Context menu does not appear when invoked from keyboard
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Interface
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
: 652302 (view as bug list)
Depends on:
Blocks: 755524
 
 
Reported: 2010-01-29 22:09 UTC by José Millán Soto
Modified: 2018-08-03 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.37 KB, patch)
2010-03-01 19:24 UTC, José Millán Soto
none Details | Review
ephy-window: Use WebKitWebView::context-menu signal to show the context menu (21.79 KB, patch)
2010-11-22 14:30 UTC, Carlos Garcia Campos
none Details | Review
Updated patch to work with current webkit (21.79 KB, patch)
2010-11-29 13:59 UTC, Carlos Garcia Campos
none Details | Review
Use WebKitWebView::context-menu signal to show the context menu (31.37 KB, patch)
2011-09-06 09:48 UTC, Carlos Garcia Campos
rejected Details | Review

Description José Millán Soto 2010-01-29 22:09:22 UTC
Context menu does not work when it's invoked from the keyboard.
This is due to epiphany not using Webkit default menu and not handling the menu key in ephy_web_view_key_press_event
Comment 1 José Millán Soto 2010-03-01 19:24:13 UTC
Created attachment 154963 [details] [review]
Patch

This patch solves this problem by making epiphany to use the default WebKit context menu when context menu is invoked using the keyboard.
Comment 2 Carlos Garcia Campos 2010-11-11 12:49:30 UTC
But we don't want the default webkit context menu, but the ephy one. We might do the same webkit does, create a fake mouse event and handle popup_menu as a right click. The problem is how to get the x, y coodinates of the current selection or focused item. 
Reading webkit code I've noticed that we are doing the hit test twice beause web_view handles the event and only when it's about to show the menu it checks the settings to decide whether actually show it or not. I think the view could just emit a signal "context-menu", or something like that, once the event has been handled and it has decided not to show the default one. That signal would pass the WebKitHitTestResult so that ephy only have to connet to it and call show_embed_popup(). 
With this approach we don't even need to get the position of the selection or currently focused item, because it has been already handled by web_view. See also webkit bug:

https://bugs.webkit.org/show_bug.cgi?id=49376
Comment 3 Carlos Garcia Campos 2010-11-22 14:30:26 UTC
Created attachment 175035 [details] [review]
ephy-window: Use WebKitWebView::context-menu signal to show the context menu

It allows to show the context menu also when triggered with the  keyboard. Use webkit_web_inspector_inspect() in popup_cmd_inspect_element() so that we don't need the coords. 
With this patch EphyEmbedEvent is not used anymore, so we might just remove it. 
The patch depends on two webkit patches:

https://bugs.webkit.org/show_bug.cgi?id=49904
https://bugs.webkit.org/show_bug.cgi?id=49903
Comment 4 Carlos Garcia Campos 2010-11-29 13:59:12 UTC
Created attachment 175465 [details] [review]
Updated patch to work with current webkit

Updated patch using webkit_web_inspector_inspect_node()
Comment 5 Reinout van Schouwen 2011-08-24 22:19:59 UTC
*** Bug 652302 has been marked as a duplicate of this bug. ***
Comment 6 Carlos Garcia Campos 2011-09-06 09:48:58 UTC
Created attachment 195767 [details] [review]
Use WebKitWebView::context-menu signal to show the context menu

Patch updated to current git master and for new webkit patch attached to bug:

https://bugs.webkit.org/show_bug.cgi?id=49904

This patch breaks the API, so I'll update ephy extensions too if patches are applied.
Comment 7 Michael Catanzaro 2015-08-12 18:39:08 UTC
The bug is still present but I doubt that the patch is still relevant?
Comment 8 Michael Catanzaro 2015-09-11 03:28:18 UTC
Review of attachment 195767 [details] [review]:

Indeed, this patch is obsolete, but the bug still exists. I think we should actually fix this in WebKit. The context menu key is something that should work in all applications, without them having to think about or add it manually.
Comment 9 GNOME Infrastructure Team 2018-08-03 19:27:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/139.