Skip to content

Commit

Permalink
TorrentListCell: passthrough clicks
Browse files Browse the repository at this point in the history
TorrentListCell elements can block click events of TorrentListRow,
and prevents users from opening the details panel when they double
click. This is especially visible with large elements like percentage
bar.

This change declares the cell as unclickable, so events can be processed.
  • Loading branch information
jesec committed Jun 30, 2021
1 parent 914ce51 commit a8fb983
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const TorrentListCell: FC<TorrentListCellProps> = observer(
className={
classNameOverride ? className : classnames('torrent__detail', `torrent__detail--${column}`, className)
}
css={{pointerEvents: 'none', userSelect: 'none'}}
role="cell"
style={{width: `${width}px`}}>
{icon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const TorrentListRowExpanded = observer(
onTouchEnd={handleTouchEnd}
onKeyPress={handleKeyPress}
ref={ref}>
<div className="torrent__details__section__wrapper">
<div css={{alignItems: 'center', display: 'flex'}}>
{primarySection}
<div className="torrent__details__section torrent__details__section--secondary">{secondarySection}</div>
</div>
Expand Down
5 changes: 0 additions & 5 deletions client/src/sass/components/_torrent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,6 @@ $more-info--border: floating-action.$textbox-repeater--button--border;
}
}
}

&__wrapper {
align-items: center;
display: flex;
}
}
}

Expand Down

0 comments on commit a8fb983

Please sign in to comment.