Skip to content

Menu.popup blocks the run/render loop #1854

Closed

Description

@aackerman

Version of Electron: 0.25.1
OS: Window 64bit 8.1

The issue for our specific application presents with animations happening in the background of the application not continuing when a context menu is opened. The expectation is that animations and the run/render loop would continue the same way context menus work in Chrome.

Activity

  1. Ivshti commented on Jun 4, 2015

    @Ivshti
    Contributor

    I also have this and can confirm it. Menu.popup, but only on OS X - blocks the GPU process I think or does something that disallows rendering from happening. The renderer process is still active, it still does stuff, but the window doesn't update visually

  2. zcbenz commented on Jun 9, 2015

    @zcbenz
    Contributor

    Menu.popup is desired to be a synchronous function in the main process, so the blocking is expected. We can probably add an asynchronous version.

  3. Ivshti commented on Jun 9, 2015

    @Ivshti
    Contributor

    That doesn't make much sense if the all is showing live data, something animated or a video. In this case it has to be async. Will doing it in the main process workaround the issue?

  4. Ivshti commented on Jun 12, 2015

    @Ivshti
    Contributor

    Confirming again that with 0.27.3, rendering continues just fine under Windows. Is it possible that this is under some form resolved?

  5. aackerman commented on Aug 15, 2015

    @aackerman
    Author

    I think the issue was attempting to run Menu.popup in a renderer window from a remote require. This is definitely not what you should do.

  6. Ivshti commented on Aug 15, 2015

    @Ivshti
    Contributor

    This is not true, the issue is still there even with async IPC, under OS X. Please do not make assumptions like that. I realize the temptation to clean up Issues, but closing issues like that is a bit extreme.

    You may have been confused by the fact that this only happens under OS X, and it doesn't really block the thread, only the rendering itself.

    @aackerman please reopen this

  7. Ivshti commented on Aug 16, 2015

    @Ivshti
    Contributor

    Should we just open another issue? As I said, the issue for me is not related to blocking the main thread, but instead stops rendering, only under OS X. @zcbenz what do you think we should do?

  8. zcbenz commented on Aug 21, 2015

    @zcbenz
    Contributor

    I think we can reopen this issue and add OS X label.

  9. reopened this on Aug 21, 2015
  10. sstur commented on Aug 26, 2015

    @sstur

    Is there an async version of Menu.popup that doesn't block rendering? If so can we make it the default context menu used for right-click events? It causes UI issues that when a user right-clicks the UI freezes. It causes issues in the tree-view around selected nodes. This has been an ongoing issue.

  11. 13 remaining items

  12. martpie commented on Jun 17, 2016

    @martpie

    @PGMLDE see my comment for a workaround #1854 (comment)

  13. pgml commented on Jun 17, 2016

    @pgml

    Already saw it, unfortunately it's not really an option to declare the context menu in the main process due to the project's code design and the fact that there is not just one menu with two elements. :/

  14. r1si commented on Aug 29, 2016

    @r1si

    I have also the same problem....

  15. lizprun commented on Oct 3, 2016

    @lizprun

    I have also the same problem.
    but it seems that slack has resolved this problem...
    how did slack do it ?

  16. martpie commented on Oct 3, 2016

    @martpie

    @r1si @lizprun You can have a look at my solution here: #1854 (comment)

    Not the easiest to implement, but it does the job pretty well.

  17. added a commit that references this issue on Nov 18, 2016
  18. AoDev commented on Jan 15, 2017

    @AoDev

    Hi, I see this issues is more than half a year old. I also face this problem and just wanted to know if there are plans on implementing the async popup in the near future. Depending on the response I would change my strategy and go for an html context menu instead of going native.

  19. pjebs commented on Jul 26, 2018

    @pjebs
  20. AliceSof commented on Oct 5, 2023

    @AliceSof

    Update

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions