From bf85cef922d54d050ae02d8be42d0848704b177b Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 10 Feb 2021 13:10:17 -0800 Subject: [PATCH] Fix HTML5Badge tooltip on mobile --- src/app/ItemPage.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/app/ItemPage.js b/src/app/ItemPage.js index 0e8a173..5ede8a0 100644 --- a/src/app/ItemPage.js +++ b/src/app/ItemPage.js @@ -980,12 +980,19 @@ function HTML5Badge({ usesHTML5, isLoading }) { } function HTML5BadgeLayout({ children, tooltipLabel, ...props }) { + const [isHovered, setIsHovered] = React.useState(false); + const [isFocused, setIsFocused] = React.useState(false); + return ( setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + onFocus={() => setIsFocused(true)} + onBlur={() => setIsFocused(false)} {...props} > {children}