Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context menu doesn't disapears after left-click #1795

Closed
sparcopt opened this issue Sep 6, 2016 · 5 comments
Closed

Context menu doesn't disapears after left-click #1795

sparcopt opened this issue Sep 6, 2016 · 5 comments

Comments

@sparcopt
Copy link

sparcopt commented Sep 6, 2016

I wasn't able to find anything about this issue, so here it goes.

  • What version of the product are you using?
    • From branch v51.0.0
  • What architecture x86 or x64?
    • 86
  • On what operating system?
    • Win7
  • Are you using WinForms, WPF or OffScreen?
    • WPF
  • What steps will reproduce the problem?
    • Open any page and right-click once. the context menu appears. Then left-click anywhere on the page besides the context menu.
  • What is the expected output? What do you see instead?
    • Expected: context menu dissapears
    • Instead: context menu won't disapear until I click in one of its options. It stays on the screen even when I alt tab to another application like Outlook, explorer, IE, etc...
  • Please provide any additional information below.
    • I'm using the "disable-gpu" command line.
    • I'm running a very simple WPF application that only contains the browser without any custom events, buttons, navigations... Just the browser itself.
@amaitland amaitland added upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. wpf labels Sep 6, 2016
@amaitland amaitland changed the title WPF bug - context menu doesn't disapears after left-click Context menu doesn't disapears after left-click Sep 6, 2016
@amaitland
Copy link
Member

To my knowledge this is the first version of CEF that has a context menu for the OSR rendering implementation (WPF uses OSR). Typically I'd suggest implementing a custom menu, unfortunately that's also a problem in 51.0.0 see #1767

If you take a look at https://github.com/cefsharp/CefSharp/blob/master/CONTRIBUTING.md#cefsharp-vs-chromium-embedded-frameworkcef you can isolate the problem, determine if it's a problem with the CefSharp implementation or a bug in CEF.

I'd suggest hosting the WinForms version in WPF, pretty common approach.

@sparcopt
Copy link
Author

sparcopt commented Sep 7, 2016

Thanks @amaitland , I will give it a try.
For the moment I will stick to your suggestion and host the WinFormsversion in WPF.

@amaitland amaitland removed the upstream These issues require fixing in the Chromium Embedded Framework(CEF) or Chromium. label Sep 8, 2016
@amaitland
Copy link
Member

Using #1748 seems to resolve the problem. So it's just a disconnect between running the message loop in a different thread it appears (Fairly common problem).

@amaitland
Copy link
Member

Using a custom menu (which is blocked on #1767) or integrate into your apps existing message loop are the two options for resolving this.

@merceyz merceyz marked this as a duplicate of #2093 Jul 17, 2017
@merceyz merceyz marked this as a duplicate of #2100 Jul 25, 2017
amaitland added a commit to amaitland/CefSharp that referenced this issue Jan 2, 2018
…mmand based on CefMenuCommand enum rather than trying to use IRunContextMenuCallback which isn't working (upstream issue)

This is a workaround for cefsharp#1767
You can use the default CEF menu it does however require you to integrate CEF into your main message loop see cefsharp#1795
amaitland added a commit that referenced this issue Jan 18, 2018
…mmand based on CefMenuCommand enum rather than trying to use IRunContextMenuCallback which isn't working (upstream issue)

This is a workaround for #1767
You can use the default CEF menu it does however require you to integrate CEF into your main message loop see #1795
amaitland added a commit that referenced this issue Jan 22, 2018
…mmand based on CefMenuCommand enum rather than trying to use IRunContextMenuCallback which isn't working (upstream issue)

This is a workaround for #1767
You can use the default CEF menu it does however require you to integrate CEF into your main message loop see #1795
@amaitland
Copy link
Member

The project source contains an example of a custom IContextMenuHandler

See https://github.com/cefsharp/CefSharp/blob/cefsharp/75/CefSharp.Wpf.Example/Handlers/MenuHandler.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants