TorrentListCell: passthrough clicks

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.
This commit is contained in:
Jesse Chan
2021-06-30 19:35:22 +08:00
parent 914ce516fc
commit a8fb9834c3
3 changed files with 2 additions and 6 deletions

View File

@@ -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}

View File

@@ -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>

View File

@@ -374,11 +374,6 @@ $more-info--border: floating-action.$textbox-repeater--button--border;
}
}
}
&__wrapper {
align-items: center;
display: flex;
}
}
}