mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-25 15:52:36 -04:00 
			
		
		
		
	Unfocus control elements when controls hides
This commit is contained in:
		
							parent
							
								
									972007f9e5
								
							
						
					
					
						commit
						4bfd7c348d
					
				| @ -163,6 +163,14 @@ export const Player: QueryPage<{ slug: string; type: "episode" | "movie" }> = ({ | ||||
| 		setPlay(!isPlaying); | ||||
| 	}; | ||||
| 
 | ||||
| 	// When the controls hide, remove focus so space can be used to play/pause instead of triggering the button
 | ||||
| 	// It also serves to hide the tooltip.
 | ||||
| 	useEffect(() => { | ||||
| 		if (Platform.OS !== "web") return; | ||||
| 		if (!displayControls && document.activeElement instanceof HTMLElement) | ||||
| 			document.activeElement.blur(); | ||||
| 	}, [displayControls]); | ||||
| 
 | ||||
| 	if (error || infoError || playbackError) | ||||
| 		return ( | ||||
| 			<> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user