From 9a9f50ab346da4ca923c663b17b52eaa22f27a9a Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 18 Sep 2020 02:33:43 -0400 Subject: [PATCH] add a zero width space to Badges to fix double click highlighting issue (#914) * add a zero width space to Badges to fix double click highlighting issue Signed-off-by: Sebastian Malton --- src/renderer/components/badge/badge.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/badge/badge.tsx b/src/renderer/components/badge/badge.tsx index b51746a871..eca3c94063 100644 --- a/src/renderer/components/badge/badge.tsx +++ b/src/renderer/components/badge/badge.tsx @@ -13,11 +13,18 @@ interface Props extends React.HTMLAttributes, TooltipDecoratorProps { export class Badge extends React.Component { render() { const { className, label, small, children, ...elemProps } = this.props; - return ( + return <> {label} {children} - ); + { /** + * This is a zero-width-space. It makes there be a word seperation + * between adjacent Badge's because 's are ignored for browers' + * word detection algorithmns use for determining the extent of the + * text to highlight on multi-click sequences. + */} + ​ + } }