Skip to content

Commit

Permalink
fix "invalid" game chip click target #10
Browse files Browse the repository at this point in the history
when"invalid" replays are shown at 50% opacity, this causes the contained player chip to be trapped within the parent element's stacking context

https://stackoverflow.com/questions/2837057/what-has-bigger-priority-opacity-or-z-index-in-browsers
  • Loading branch information
jmlee337 committed Mar 5, 2024
1 parent 14285ad commit 951ec03
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/renderer/ReplayList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ const ReplayListItem = memo(function ReplayListItem({
return (
<ListItemButton
disableGutters
style={replay.isValid ? {} : { opacity: '50%' }}
style={
replay.isValid ||
(selectedChipData.displayName && selectedChipData.entrantId)
? {}
: { opacity: '50%' }
}
selected={replay.selected}
onClick={onClickCallback}
>
Expand Down

0 comments on commit 951ec03

Please sign in to comment.