[web] Thumbnails: Handle the first click on mobile devices (#3266)

Using opacity: 0 to was causing the first click to be intercepted by the
input element itself on mobile devices.
This commit is contained in:
Manav Rathi
2024-09-14 15:35:08 +05:30
committed by GitHub

View File

@@ -45,7 +45,6 @@ const Check = styled("input")<{ $active: boolean }>`
position: absolute;
z-index: 10;
left: 0;
opacity: 0;
outline: none;
cursor: pointer;
@media (pointer: coarse) {
@@ -93,8 +92,10 @@ const Check = styled("input")<{ $active: boolean }>`
border-right: 2px solid #ddd;
border-bottom: 2px solid #ddd;
}
${(props) => props.$active && "opacity: 0.5 "};
visibility: hidden;
${(props) => props.$active && "visibility: visible; opacity: 0.5;"};
&:checked {
visibility: visible;
opacity: 1 !important;
}
`;