diff --git a/.changeset/quiet-lions-retire.md b/.changeset/quiet-lions-retire.md deleted file mode 100644 index ae7b7e09..00000000 --- a/.changeset/quiet-lions-retire.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@tanstack/hotkeys': patch ---- - -fix: hotkeys not triggering on Brave browser when target is `document` or `window` - -Hotkeys registered on `document` or `window` were not being triggered on Brave browser due to non-standard `event.currentTarget` behavior. Brave sets `currentTarget` to `document.documentElement` instead of `document` when a listener is attached to `document`, likely due to privacy/fingerprinting protections. - -Updated `#isEventForTarget` to accept both `document` and `document.documentElement` as valid `currentTarget` values for cross-browser compatibility. diff --git a/examples/react/useHeldKeys/package.json b/examples/react/useHeldKeys/package.json index 4fbbecab..c041db04 100644 --- a/examples/react/useHeldKeys/package.json +++ b/examples/react/useHeldKeys/package.json @@ -11,13 +11,13 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-hotkeys": "^0.1.2", + "@tanstack/react-hotkeys": "^0.1.3", "react": "^19.2.4", "react-dom": "^19.2.4" }, "devDependencies": { "@tanstack/react-devtools": "0.9.5", - "@tanstack/react-hotkeys-devtools": "^0.1.2", + "@tanstack/react-hotkeys-devtools": "^0.1.3", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.4", diff --git a/examples/react/useHotkey/package.json b/examples/react/useHotkey/package.json index eb997e5f..0301c85c 100644 --- a/examples/react/useHotkey/package.json +++ b/examples/react/useHotkey/package.json @@ -11,13 +11,13 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-hotkeys": "^0.1.2", + "@tanstack/react-hotkeys": "^0.1.3", "react": "^19.2.4", "react-dom": "^19.2.4" }, "devDependencies": { "@tanstack/react-devtools": "0.9.5", - "@tanstack/react-hotkeys-devtools": "^0.1.2", + "@tanstack/react-hotkeys-devtools": "^0.1.3", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.4", diff --git a/examples/react/useHotkeyRecorder/package.json b/examples/react/useHotkeyRecorder/package.json index 62fc5938..6e5dfa8d 100644 --- a/examples/react/useHotkeyRecorder/package.json +++ b/examples/react/useHotkeyRecorder/package.json @@ -11,13 +11,13 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-hotkeys": "^0.1.2", + "@tanstack/react-hotkeys": "^0.1.3", "react": "^19.2.4", "react-dom": "^19.2.4" }, "devDependencies": { "@tanstack/react-devtools": "0.9.5", - "@tanstack/react-hotkeys-devtools": "^0.1.2", + "@tanstack/react-hotkeys-devtools": "^0.1.3", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.4", diff --git a/examples/react/useHotkeySequence/package.json b/examples/react/useHotkeySequence/package.json index 20300889..10f9057e 100644 --- a/examples/react/useHotkeySequence/package.json +++ b/examples/react/useHotkeySequence/package.json @@ -11,13 +11,13 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-hotkeys": "^0.1.2", + "@tanstack/react-hotkeys": "^0.1.3", "react": "^19.2.4", "react-dom": "^19.2.4" }, "devDependencies": { "@tanstack/react-devtools": "0.9.5", - "@tanstack/react-hotkeys-devtools": "^0.1.2", + "@tanstack/react-hotkeys-devtools": "^0.1.3", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.4", diff --git a/examples/react/useKeyhold/package.json b/examples/react/useKeyhold/package.json index acdfada7..887b0739 100644 --- a/examples/react/useKeyhold/package.json +++ b/examples/react/useKeyhold/package.json @@ -11,13 +11,13 @@ "test:types": "tsc" }, "dependencies": { - "@tanstack/react-hotkeys": "^0.1.2", + "@tanstack/react-hotkeys": "^0.1.3", "react": "^19.2.4", "react-dom": "^19.2.4" }, "devDependencies": { "@tanstack/react-devtools": "0.9.5", - "@tanstack/react-hotkeys-devtools": "^0.1.2", + "@tanstack/react-hotkeys-devtools": "^0.1.3", "@types/react": "^19.2.14", "@types/react-dom": "^19.2.3", "@vitejs/plugin-react": "^5.1.4", diff --git a/packages/hotkeys-devtools/CHANGELOG.md b/packages/hotkeys-devtools/CHANGELOG.md index dc1a8da5..d937f499 100644 --- a/packages/hotkeys-devtools/CHANGELOG.md +++ b/packages/hotkeys-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/hotkeys-devtools +## 0.1.3 + +### Patch Changes + +- Updated dependencies [[`26a74d8`](https://github.com/TanStack/hotkeys/commit/26a74d8e3279766a5cddbc7e7f146af0557cfbb9)]: + - @tanstack/hotkeys@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/hotkeys-devtools/package.json b/packages/hotkeys-devtools/package.json index 5b812ea4..f90c4700 100644 --- a/packages/hotkeys-devtools/package.json +++ b/packages/hotkeys-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/hotkeys-devtools", - "version": "0.1.2", + "version": "0.1.3", "description": "Devtools for TanStack Hotkeys", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/hotkeys/CHANGELOG.md b/packages/hotkeys/CHANGELOG.md index dea34f7e..6e4fb077 100644 --- a/packages/hotkeys/CHANGELOG.md +++ b/packages/hotkeys/CHANGELOG.md @@ -1,5 +1,15 @@ # @tanstack/hotkeys +## 0.1.3 + +### Patch Changes + +- fix: hotkeys not triggering on Brave browser when target is `document` or `window` ([#20](https://github.com/TanStack/hotkeys/pull/20)) + + Hotkeys registered on `document` or `window` were not being triggered on Brave browser due to non-standard `event.currentTarget` behavior. Brave sets `currentTarget` to `document.documentElement` instead of `document` when a listener is attached to `document`, likely due to privacy/fingerprinting protections. + + Updated `#isEventForTarget` to accept both `document` and `document.documentElement` as valid `currentTarget` values for cross-browser compatibility. + ## 0.1.2 ### Patch Changes diff --git a/packages/hotkeys/package.json b/packages/hotkeys/package.json index d0512389..436f9490 100644 --- a/packages/hotkeys/package.json +++ b/packages/hotkeys/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/hotkeys", - "version": "0.1.2", + "version": "0.1.3", "description": "Type-safe, framework-agnostic keyboard hotkey management for the browser", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/react-hotkeys-devtools/CHANGELOG.md b/packages/react-hotkeys-devtools/CHANGELOG.md index 014687df..a5a3be7f 100644 --- a/packages/react-hotkeys-devtools/CHANGELOG.md +++ b/packages/react-hotkeys-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-hotkeys-devtools +## 0.1.3 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/hotkeys-devtools@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/react-hotkeys-devtools/package.json b/packages/react-hotkeys-devtools/package.json index d89c6fb0..3452823b 100644 --- a/packages/react-hotkeys-devtools/package.json +++ b/packages/react-hotkeys-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-hotkeys-devtools", - "version": "0.1.2", + "version": "0.1.3", "description": "React devtools for TanStack Hotkeys", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/react-hotkeys/CHANGELOG.md b/packages/react-hotkeys/CHANGELOG.md index cd93ad80..e0fe16b1 100644 --- a/packages/react-hotkeys/CHANGELOG.md +++ b/packages/react-hotkeys/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-hotkeys +## 0.1.3 + +### Patch Changes + +- Updated dependencies [[`26a74d8`](https://github.com/TanStack/hotkeys/commit/26a74d8e3279766a5cddbc7e7f146af0557cfbb9)]: + - @tanstack/hotkeys@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/react-hotkeys/package.json b/packages/react-hotkeys/package.json index cb5e059f..ef46202d 100644 --- a/packages/react-hotkeys/package.json +++ b/packages/react-hotkeys/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-hotkeys", - "version": "0.1.2", + "version": "0.1.3", "description": "React adapter for TanStack Hotkeys", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/solid-hotkeys-devtools/CHANGELOG.md b/packages/solid-hotkeys-devtools/CHANGELOG.md index 1ae29d22..a8da46d7 100644 --- a/packages/solid-hotkeys-devtools/CHANGELOG.md +++ b/packages/solid-hotkeys-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/solid-hotkeys-devtools +## 0.1.3 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/hotkeys-devtools@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/solid-hotkeys-devtools/package.json b/packages/solid-hotkeys-devtools/package.json index 90e81087..4b43764e 100644 --- a/packages/solid-hotkeys-devtools/package.json +++ b/packages/solid-hotkeys-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-hotkeys-devtools", - "version": "0.1.2", + "version": "0.1.3", "description": "SolidJS devtools for TanStack Hotkeys", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/solid-hotkeys/CHANGELOG.md b/packages/solid-hotkeys/CHANGELOG.md index 2683409b..1fc040fe 100644 --- a/packages/solid-hotkeys/CHANGELOG.md +++ b/packages/solid-hotkeys/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/solid-hotkeys +## 0.1.3 + +### Patch Changes + +- Updated dependencies [[`26a74d8`](https://github.com/TanStack/hotkeys/commit/26a74d8e3279766a5cddbc7e7f146af0557cfbb9)]: + - @tanstack/hotkeys@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/solid-hotkeys/package.json b/packages/solid-hotkeys/package.json index 53efa621..c1253a5d 100644 --- a/packages/solid-hotkeys/package.json +++ b/packages/solid-hotkeys/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-hotkeys", - "version": "0.1.2", + "version": "0.1.3", "description": "SolidJS adapter for TanStack Hotkeys", "author": "Tanner Linsley", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index acfdf750..0ced805d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,7 +84,7 @@ importers: examples/react/useHeldKeys: dependencies: '@tanstack/react-hotkeys': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys react: specifier: ^19.2.4 @@ -97,7 +97,7 @@ importers: specifier: 0.9.5 version: 0.9.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(solid-js@1.9.11) '@tanstack/react-hotkeys-devtools': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys-devtools '@types/react': specifier: ^19.2.14 @@ -118,7 +118,7 @@ importers: examples/react/useHotkey: dependencies: '@tanstack/react-hotkeys': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys react: specifier: ^19.2.4 @@ -131,7 +131,7 @@ importers: specifier: 0.9.5 version: 0.9.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(solid-js@1.9.11) '@tanstack/react-hotkeys-devtools': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys-devtools '@types/react': specifier: ^19.2.14 @@ -152,7 +152,7 @@ importers: examples/react/useHotkeyRecorder: dependencies: '@tanstack/react-hotkeys': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys react: specifier: ^19.2.4 @@ -165,7 +165,7 @@ importers: specifier: 0.9.5 version: 0.9.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(solid-js@1.9.11) '@tanstack/react-hotkeys-devtools': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys-devtools '@types/react': specifier: ^19.2.14 @@ -186,7 +186,7 @@ importers: examples/react/useHotkeySequence: dependencies: '@tanstack/react-hotkeys': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys react: specifier: ^19.2.4 @@ -199,7 +199,7 @@ importers: specifier: 0.9.5 version: 0.9.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(solid-js@1.9.11) '@tanstack/react-hotkeys-devtools': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys-devtools '@types/react': specifier: ^19.2.14 @@ -220,7 +220,7 @@ importers: examples/react/useKeyhold: dependencies: '@tanstack/react-hotkeys': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys react: specifier: ^19.2.4 @@ -233,7 +233,7 @@ importers: specifier: 0.9.5 version: 0.9.5(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(csstype@3.2.3)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(solid-js@1.9.11) '@tanstack/react-hotkeys-devtools': - specifier: ^0.1.2 + specifier: ^0.1.3 version: link:../../../packages/react-hotkeys-devtools '@types/react': specifier: ^19.2.14