-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add tests for existing key press dispatches and remove one jQuery call for volume focus (2/x) #839
base: staging
Are you sure you want to change the base?
Conversation
@@ -28,6 +28,17 @@ function VolumeControl({ muted = false, volume = true, dispatch }) { | |||
} | |||
}; | |||
|
|||
const sliderRef = useRef(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so there isn't a super elegant way to get around findElementById
or $
when we want to mess with focus but useRef + useEffect with creating a function available to the entire window
is a workaround of sorts.
https://www.reddit.com/r/react/comments/1b5nwoh/focusing_on_elements_programmatically_in_react/ - others seem to also converge around this
#777
useElementById
,useImperativeHandle
,PlayerData
global variable but this felt the neatest.