Skip to content

useKeyHold keeps returning true when devTools is open in some cases #66

Description

@debel27

TanStack Hotkeys version

v0.4.1

Framework/Library version

React v19.2.3

Describe the bug and the steps to reproduce it

Granted, this is a niche use case. The bug mostly affect developers, not end users.

Steps to reproduce

Image
  • Do not close the DevTools. Click anywhere on the page
  • Trigger the devTools' keyboard shortcut to inspect a DOM element (on a Mac: Cmd+Shift+I)
  • (Optional) Click any element on the page

Expected result

The Meta and Shift keys appear as "Released"

Image

Actual result

The Meta and Shift keys keep appearing as "HELD"

Image

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/devbox/github/tanstack/hotkeys/tree/main/examples/react/useKeyhold?embed=1&file=%2Fsrc%2Findex.tsx

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I do not have time to dig into it

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Activity

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