Skip to content

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

Closed
@sparcopt

Description

@sparcopt

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.

Activity

added
upstreamThese issues require fixing in the Chromium Embedded Framework(CEF) or Chromium.
wpfWPF Implementation
on Sep 6, 2016
changed the title [-]WPF bug - context menu doesn't disapears after left-click[/-] [+]Context menu doesn't disapears after left-click[/+] on Sep 6, 2016
amaitland

amaitland commented on Sep 7, 2016

@amaitland
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

sparcopt commented on Sep 7, 2016

@sparcopt
Author

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

removed
upstreamThese issues require fixing in the Chromium Embedded Framework(CEF) or Chromium.
on Sep 8, 2016
amaitland

amaitland commented on Sep 8, 2016

@amaitland
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

amaitland commented on Jan 10, 2017

@amaitland
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.

amaitland

amaitland commented on Oct 22, 2019

@amaitland
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @amaitland@sparcopt

        Issue actions

          Context menu doesn't disapears after left-click · Issue #1795 · cefsharp/CefSharp