fix(chat): fix missing alt tags on custom emoji. Closes #3106
This commit is contained in:
@@ -179,7 +179,7 @@ export const ChatTextField: FC<ChatTextFieldProps> = ({ defaultText, enabled, fo
|
||||
|
||||
// Custom emoji images
|
||||
const onCustomEmojiSelect = (name: string, emoji: string) => {
|
||||
const html = `<img src="${emoji}" alt="${name}" title=${name} class="emoji" />`;
|
||||
const html = `<img src="${emoji}" alt="${name}" title="${name}" class="emoji" />`;
|
||||
insertTextAtCursor(html);
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ export const EmojiPicker: FC<EmojiPickerProps> = ({ onEmojiSelect, onCustomEmoji
|
||||
});
|
||||
picker.addEventListener('emoji:select', event => {
|
||||
if (event.url) {
|
||||
onCustomEmojiSelect(event.name, event.url);
|
||||
onCustomEmojiSelect(event.label, event.url);
|
||||
} else {
|
||||
onEmojiSelect(event.emoji);
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ export const ChatUserMessage: FC<ChatUserMessageProps> = ({
|
||||
if (isAuthorBot) {
|
||||
badgeNodes.push(<BotUserBadge key="bot" userColor={displayColor} />);
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
|
||||
Reference in New Issue
Block a user