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

when popup window in running, if main windows is clicked by user, the detecting will not work #21

Open
GalliumWang opened this issue Feb 9, 2022 · 0 comments

Comments

@GalliumWang
Copy link

there is some bug with the code below

    // detection.ts
    const isBrowserActive = document.hasFocus() || handler.document.hasFocus()
    if (!isBrowserActive) {
      throw AlertMessage.FocusWindow
    }

    // Make test
    if (document.hasFocus()) {
      document.body.insertBefore(input, document.getElementById('app'))
    } else {
      handler.document.body.appendChild(input)
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant