Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Webview Context Menu
Webview Context Menu
I have a project which uses a Windowless Browser. When I right click on a web page the context menu appears, but it is grayed out and is not functional. I tried the same thing in the Windowless Browser demo and the same thing happens.
- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Webview Context Menu
The embedded browser decides what context menu items are enabled or disabled.
The WindowlessBrowser demo shows the context menu correctly when it loads the default web page.
The WindowlessBrowser demo shows the context menu correctly when it loads the default web page.
Re: Webview Context Menu
But why are all menu items grayed? This happens in the WindowlessBrowser demo as well.
There must be some setting in my system somewhere that is causing this, but I can't find anything when I Google the issue.
There must be some setting in my system somewhere that is causing this, but I can't find anything when I Google the issue.
- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Webview Context Menu
As you can see in the snapshot, I can't reproduce this issue with the demo unless you provide more details.

The WindowlessBrowser demo uses the TWVBrowser.OnContextMenuRequested event to add a custom context menu item called 'Execute custom JavaScript...'
It doesn't disable any other menu entry and I still can see the correct context menu after navigating to other websites.
Check that the web page that you're testing doesn't disable the context menu using JavaScrtipt.

The WindowlessBrowser demo uses the TWVBrowser.OnContextMenuRequested event to add a custom context menu item called 'Execute custom JavaScript...'
It doesn't disable any other menu entry and I still can see the correct context menu after navigating to other websites.
Check that the web page that you're testing doesn't disable the context menu using JavaScrtipt.
Re: Webview Context Menu
I don't know what it is in my system that causes this behavior in the Windowless Browsers, but I tried the MiniBrowser demo, and the context menu works correctly. So now I'm in the process of changing my project to not use a Windowless Browser, and it's working so far.