Rovango / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Support creation and modification of mouse context menu #56

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The browser displays a default context menu on right-click. CEF has an API for 
customizing natively this menu. It would be nice to have it in CEF Python.

A workaround for hiding this menu:

    def OnLoadStart(browser, frame):
        #disable default context menu
        frame.ExecuteJavascript("document.oncontextmenu = function() {return false;}")

Original issue reported on code.google.com by luc.jean@gmail.com on 21 May 2013 at 6:55

GoogleCodeExporter commented 8 years ago
API for creating native menus is available only in CEF 3. See 
cef_context_menu_handler.h [1] and cef_menu_model.h [2].

[1] 
https://code.google.com/p/chromiumembedded/source/browse/trunk/cef3/include/cef_
context_menu_handler.h?r=1255
[2] 
https://code.google.com/p/chromiumembedded/source/browse/trunk/cef3/include/cef_
menu_model.h?r=1255

Original comment by czarek.t...@gmail.com on 21 May 2013 at 7:26

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Starting with release 31.0 it is possible to customize menu by 
enabling/disabling items, see ApplicationSettings."context_menu". However it 
does not allow for adding new menu items.

Original comment by czarek.t...@gmail.com on 10 Aug 2014 at 5:39

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/56

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:30