Poll: Fix voting triggers quick reaction (#1993)

This commit is contained in:
Alexander Zinchuk 2022-08-09 13:21:30 +02:00
parent b4120c0483
commit c9c744822f

View File

@ -278,7 +278,7 @@ const Poll: FC<OwnProps & StateProps> = ({
)}
</div>
{canVote && (
<div className="poll-answers">
<div className="poll-answers" onClick={stopPropagation}>
{isMultiple
? (
<CheckboxGroup
@ -356,6 +356,10 @@ function getReadableVotersCount(lang: LangFn, isQuiz: true | undefined, count?:
return lang(isQuiz ? 'Answer' : 'Vote', count, 'i');
}
function stopPropagation(e: React.MouseEvent<HTMLDivElement>) {
e.stopPropagation();
}
export default memo(withGlobal<OwnProps>(
(global, { poll }) => {
const { recentVoterIds } = poll.results;