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

use useEffect for key listeners on camera control panel #7827

Merged
merged 3 commits into from
Sep 21, 2023

Conversation

hawkeye217
Copy link
Collaborator

The PTZ camera controls on birdseye and the individual camera components has a key listener that was triggering after the component was unmounted (when moving from birdseye to editing the config, for example).

I was able to reproduce the issue on both Safari and Firefox. Use the plus or minus keys to zoom in/out, then navigate to the config editor and type a dash.

This PR moves the keyup and keydown listeners into callbacks and implements useEffect.

@netlify
Copy link

netlify bot commented Sep 15, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 0a8edee
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/650493667471530008c58e37

@NickM-27
Copy link
Collaborator

ah, I had seen logs of trying to move the camera every once in a while and I was confused, that makes sense. Thanks!

@hawkeye217
Copy link
Collaborator Author

Need to tweak this a little so the linter doesn't fail. My preact is rusty 😂

@hawkeye217
Copy link
Collaborator Author

Should be good to go now.

@blakeblackshear blakeblackshear merged commit a3eccce into blakeblackshear:dev Sep 21, 2023
@hawkeye217 hawkeye217 deleted the ptz-key-fixes branch September 29, 2023 03:35
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

Successfully merging this pull request may close these issues.

3 participants