Skip to content

await function won't fire until mouse clicked on any gui element #862

Closed

Description

@adapt7

Describe the bug
QPushButton has await function on addEventListener('clicked' but when button is clicked the await function is not fired until mouse click on any other gui element. The event listener works fine, non await methods fire without issues.

To Reproduce
Steps to reproduce the behavior:

  1. Create QPushButton
  2. Enable event listener "clicked" with await function on click

Expected behavior
await method should run immediately when button is clicked.

Desktop (please complete the following information):

  • OS: Linux
  • NodeGUI version 0.33.1
  • OS Version Ubuntu 20.4

Additional context
In this example the await function is the node-fetch fetch method.

Activity

  1. a7ul commented on Aug 3, 2021

    @a7ul
    Collaborator

    Yes this should be fixed in an upcoming release of qode.
    nodegui/qode#35

  2. adapt7 commented on Aug 4, 2021

    @adapt7
    Author

    Thank you @a7ul

    Is there an ETA when this release will be available?

    Can I compile that upcoming release now, if so what's the best way to do it? Is it stable?

  3. a7ul commented on Aug 4, 2021

    @a7ul
    Collaborator

    Hmm, so the eta would be end of this week mostly.
    But in the meantime you could try this dev build of qode.

    Mac x64:

    So the way to go for now is:
    extract the qode binary from archive above.
    And then replace the qode binary found at node_modules/@nodegui/qode/binaries

  4. adapt7 commented on Aug 4, 2021

    @adapt7
    Author

    and that's the game changer! Thank you @a7ul

  5. foxt commented on Aug 21, 2021

    @foxt

    Sorry to revive a stale issue @a7ul, but I'm still getting this issue with the latest version of Qode. Using the dev version you sent works, however this isn't great, especially if I'm putting this in production

    Note that I can only reproduce this on macOS, it works fine on Windows for whatever reason.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions