fix: Switch to opacity: 0 for composer emoji.

This seems to be the best option for displaying emoji in the composer. While it means selected emoji don't actually have the selection colour applied, it's the most functional of all the options. Facebook uses the same approach.
pull/21833/head
Aviral Dasgupta 2016-08-03 18:27:49 +05:30
parent b7555f49ea
commit 8e66e6dfdd
1 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ function unicodeToEmojiUri(str) {
return str;
}
// Unused for now, due to https://github.com/facebook/draft-js/issues/414
// Workaround for https://github.com/facebook/draft-js/issues/414
let emojiDecorator = {
strategy: (contentBlock, callback) => {
findWithRegex(EMOJI_REGEX, contentBlock, callback);
@ -115,7 +115,7 @@ let emojiDecorator = {
backgroundPosition: 'center center',
overflow: 'hidden',
};
return (<span title={shortname} style={style}><span style={{color: 'transparent'}}>{props.children}</span></span>);
return (<span title={shortname} style={style}><span style={{opacity: 0}}>{props.children}</span></span>);
},
};