mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix(chat): added emoji tooltip and enter key in smiley panel
This commit is contained in:
committed by
Дамян Минков
parent
4e50546773
commit
38be09fc54
@@ -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>
|
||||
));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user