mirror of https://github.com/vector-im/riot-web
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
parent
b7555f49ea
commit
8e66e6dfdd
|
@ -98,7 +98,7 @@ function unicodeToEmojiUri(str) {
|
||||||
return 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 = {
|
let emojiDecorator = {
|
||||||
strategy: (contentBlock, callback) => {
|
strategy: (contentBlock, callback) => {
|
||||||
findWithRegex(EMOJI_REGEX, contentBlock, callback);
|
findWithRegex(EMOJI_REGEX, contentBlock, callback);
|
||||||
|
@ -115,7 +115,7 @@ let emojiDecorator = {
|
||||||
backgroundPosition: 'center center',
|
backgroundPosition: 'center center',
|
||||||
overflow: 'hidden',
|
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>);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue