fixes #3498 - blurs the fullscreen button to prevent spacebar from selecting it again

ts-ignore -> flowFixMe
This commit is contained in:
Dalton 2020-01-29 19:45:58 -06:00 committed by Sean Yesmunt
parent 5dd3502a3c
commit d191be8771

View file

@ -217,6 +217,11 @@ function VideoViewer(props: Props) {
if (player) {
player.on('tracking:buffered', (e, d) => doTrackingBuffered(e, d));
player.on('tracking:firstplay', (e, d) => doTrackingFirstPlay(e, d));
// fixes #3498 (https://github.com/lbryio/lbry-desktop/issues/3498)
// summary: on firefox the focus would stick to the fullscreen button which caused buggy behavior with spacebar
// $FlowFixMe
player.on('fullscreenchange', () => document.activeElement && document.activeElement.blur());
}
return () => {
if (player) {