Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(chat): added emoji tooltip and enter key in smiley panel

ilaydadastan38be09fc5486
diff --git a/react/features/chat/components/web/SmileysPanel.tsx b/react/features/chat/components/web/SmileysPanel.tsx
index 1ecc22895c..804d9ed542 100644
--- a/react/features/chat/components/web/SmileysPanel.tsx
+++ b/react/features/chat/components/web/SmileysPanel.tsx
@@ -1,6 +1,7 @@
import React, { PureComponent } from 'react';
import Emoji from 'react-emoji-render';
+import Tooltip from '../../../base/tooltip/components/Tooltip';
import { smileys } from '../../smileys';
/**
@@ -60,7 +61,7 @@ class SmileysPanel extends PureComponent<IProps> {
* @returns {void}
*/
_onKeyPress(e: React.KeyboardEvent<HTMLDivElement>) {
- if (e.key === ' ') {
+ if (e.key === ' ' || e.key === 'Enter') {
e.preventDefault(); // @ts-ignore
this.props.onSmileySelect(e.target.id && smileys[e.target.id]);
}
@@ -95,9 +96,11 @@ class SmileysPanel extends PureComponent<IProps> {
onKeyPress = { this._onKeyPress }
role = 'option'
tabIndex = { 0 }>
- <Emoji
- onlyEmojiClassName = 'smiley'
- text = { smileys[smileyKey as keyof typeof smileys] } />
+ <Tooltip content = { smileys[smileyKey as keyof typeof smileys] }>
+ <Emoji
+ onlyEmojiClassName = 'smiley'
+ text = { smileys[smileyKey as keyof typeof smileys] } />
+ </Tooltip>
</div>
));