JohannesKlauss / react-hotkeys-hook

React hook for using keyboard shortcuts in components.
https://react-hotkeys-hook.vercel.app/
MIT License
2.57k stars 113 forks source link

[BUG] Working locally, but not in production #1131

Closed mnapoli closed 5 months ago

mnapoli commented 5 months ago

Describe the bug

Hotkeys work perfectly locally, but not in production.

Note that some hotkeys are working (?), but 2 are to (+ and -) and I cannot explain why!

To Reproduce

    useHotkeys('-', () => {
        setTimeSize(timeSize * 2);
    },);

Expected behavior It works locally (local development) and in production (deployed to Netlify).

Desktop (please complete the following information):

JohannesKlauss commented 5 months ago

Please prodvice a reproducible

mnapoli commented 5 months ago

😅 sure: https://watch-aws-lambda-scale.com/

Click "Send request" multiple times, then try the +/- shortcuts. The animation should zoom in/out. Works perfectly locally. Now this is deployed to netlify. Note that the ? should work, which is weird!

JohannesKlauss commented 5 months ago

This is not a reproducible. This is your deployed app. Please provide a reproducible code sandbox

JohannesKlauss commented 5 months ago

But looking into the shipped code of your page I can already tell that this is not an issue with the library. You are not shipping any javascript to the client that would relate to the usage of this hook.

mnapoli commented 5 months ago

You are not shipping any javascript to the client that would relate to the usage of this hook.

What do you mean? Do you mean that the shipped code does not use your library? I think a simple way to check that it's the case is to try the ? shortcut: this one works. So the library is indeed shipped to the client, and is executed.

I understand your position though, any shortcut to close the issue and ignore is fair, I'm an OSS maintainer of 15 years too, I know the tricks 🤷

Anyway, this is a long shot because you might have no time to provide support at all, but: if you have any remote idea on why this could be happening, that could put me on the right track to debug, feel free to share. Thank you.

JohannesKlauss commented 5 months ago

I am not interested in ignoring an issue, but as I said, please provide a reproducible sandbox.