Page 1 of 1

Webview Context Menu

Posted: Thu Oct 31, 2024 8:44 pm
by jc4golf
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.

Re: Webview Context Menu

Posted: Fri Nov 01, 2024 10:05 am
by salvadordf
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.

Re: Webview Context Menu

Posted: Wed Nov 06, 2024 5:40 pm
by jc4golf
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.

Re: Webview Context Menu

Posted: Thu Nov 07, 2024 11:11 am
by salvadordf
As you can see in the snapshot, I can't reproduce this issue with the demo unless you provide more details.
Image

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

Posted: Fri Nov 08, 2024 2:16 am
by jc4golf
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.