From c75a469e3ae4feae9d76443e36022c5ccb9f0711 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Mon, 21 Feb 2022 17:39:53 +0000 Subject: [PATCH] Fix poll plugin --- packages/lexical-playground/src/nodes/PollNode.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/lexical-playground/src/nodes/PollNode.js b/packages/lexical-playground/src/nodes/PollNode.js index 652aae7a5..b3cdaf7c1 100644 --- a/packages/lexical-playground/src/nodes/PollNode.js +++ b/packages/lexical-playground/src/nodes/PollNode.js @@ -69,6 +69,7 @@ const styles = stylex.create({ fontWeight: 'normal', color: '#999', }, + zIndex: 0, }, optionInputVotes: { backgroundColor: 'rgb(236, 243, 254)', @@ -77,6 +78,7 @@ const styles = stylex.create({ top: 0, left: 0, transition: 'width 1s ease', + zIndex: 0, }, optionInputVotesCount: { color: 'rgb(61,135,245)', @@ -118,7 +120,7 @@ const styles = stylex.create({ backgroundColor: 'transparent', backgroundPosition: '6px 6px', backgroundRepeat: 'no-repeat', - zIndex: 2, + zIndex: 0, cursor: 'pointer', borderRadius: 5, opacity: 0.3, @@ -165,7 +167,7 @@ function getTotalVotes(options: DecoratorArray): number { // $FlowFixMe: need to revise type const votes: number = options.reduce((totalVotes, next) => { // $FlowFixMe: need to revise type - return totalVotes + next.get('votes').length; + return totalVotes + next.get('votes').getLength(); }, 0); return votes;