python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.38k stars 583 forks source link

Custom close callback is called with any hyperlink, _websockets always null #547

Open dmenezesgabriel opened 2 years ago

dmenezesgabriel commented 2 years ago

Eel version 0.14.0

Describe the bug When a custom_callback function is defined on start and some link or button tag is clicked, the close_callback is called and the _websockets list is always empty, so the application is terminated.

To Reproduce Steps to reproduce the behavior:

  1. Get the hello world example
  2. Put a <a href=“Click me”> anywhere
  3. Define a close callback function:
    def close_callback(route, websockets):
    print(websockets)
    if not websockets:
        exit()

    Expected behavior Clicking on anchor links or buttons shouldn’t send a close_callback.

Desktop:

shidandev commented 1 year ago

any solution for this bug?