Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 568666

Summary: [Chromium] Custom context menus don't work with the Chromium browser
Product: [Eclipse Project] Platform Reporter: Camille Letavernier <cletavernier>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, jfaltermeier
Version: 4.17   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 569095    
Attachments:
Description Flags
example-project none

Description Camille Letavernier CLA 2020-11-10 05:44:17 EST
Created attachment 284721 [details]
example-project

When adding a custom context menu to an SWT Browser, the context menu properly replaces the original/native one from the browser. However, when using the Chromium browser, custom context menus are not displayed.

The following error is reported when right-clicking in the browser (on Ubuntu):

> [1110/113414.348390:ERROR:browser_main_loop.cc(256)] GLib-GObject: g_object_set_data: assertion 'G_IS_OBJECT (object)' failed

I've attached a small example project to easily reproduce the issue. It contributes a new Eclipse view (Other > Browser Menus). Depending on the values for the useChromium / useCustomMenu booleans, we can observe different behaviors:

- useCustomMenu = false: native browser menus work in both cases (Chromium / Default)
- useChromium = false: native and custom menus work
- useChromium = true: custom menus don't work

Note that opening the context menu from the keyboard seems to work; but using a right-click doesn't.

All this was tested on Eclipse 2020-09, on both Ubuntu and Windows.
Comment 1 Alexander Kurtakov CLA 2021-10-04 04:49:46 EDT
Chromium has been removed via bug 572010 .