diff --git a/res/css/views/messages/_MPollBody.scss b/res/css/views/messages/_MPollBody.scss index 3c6471dd53..81613339d1 100644 --- a/res/css/views/messages/_MPollBody.scss +++ b/res/css/views/messages/_MPollBody.scss @@ -109,6 +109,11 @@ limitations under the License. } } + // options not actionable in these states + .mx_MPollBody_option_checked, .mx_MPollBody_option_ended { + pointer-events: none; + } + .mx_StyledRadioButton_checked, .mx_MPollBody_endedOptionWinner { input[type="radio"] + div { border-width: 2px; @@ -150,3 +155,10 @@ limitations under the License. .mx_ReplyTile .mx_MPollBody { pointer-events: none; } + +.mx_MPollBody_option, +// label has cursor: default in user-agent stylesheet +// override +.mx_MPollBody_live-option { + cursor: pointer; +} diff --git a/src/components/views/messages/MPollBody.tsx b/src/components/views/messages/MPollBody.tsx index 90dd4f554c..f0c806205e 100644 --- a/src/components/views/messages/MPollBody.tsx +++ b/src/components/views/messages/MPollBody.tsx @@ -438,6 +438,7 @@ export default class MPollBody extends React.Component { const cls = classNames({ "mx_MPollBody_option": true, "mx_MPollBody_option_checked": checked, + "mx_MPollBody_option_ended": ended, }); const answerPercent = ( @@ -513,6 +514,7 @@ interface ILivePollOptionProps { function LivePollOption(props: ILivePollOptionProps) { return
@@ -155,7 +155,7 @@ exports[`MPollBody renders a finished poll 1`] = `
@@ -217,7 +217,7 @@ exports[`MPollBody renders a finished poll 1`] = `
@@ -279,7 +279,7 @@ exports[`MPollBody renders a finished poll 1`] = `
@@ -444,7 +444,7 @@ exports[`MPollBody renders a finished poll with multiple winners 1`] = ` className="mx_MPollBody_allOptions" >
@@ -506,7 +506,7 @@ exports[`MPollBody renders a finished poll with multiple winners 1`] = `
@@ -568,7 +568,7 @@ exports[`MPollBody renders a finished poll with multiple winners 1`] = `
@@ -630,7 +630,7 @@ exports[`MPollBody renders a finished poll with multiple winners 1`] = `
@@ -795,7 +795,7 @@ exports[`MPollBody renders a finished poll with no votes 1`] = ` className="mx_MPollBody_allOptions" >
@@ -857,7 +857,7 @@ exports[`MPollBody renders a finished poll with no votes 1`] = `
@@ -919,7 +919,7 @@ exports[`MPollBody renders a finished poll with no votes 1`] = `
@@ -981,7 +981,7 @@ exports[`MPollBody renders a finished poll with no votes 1`] = `
@@ -1179,13 +1179,13 @@ exports[`MPollBody renders a poll that I have not voted in 1`] = `