From e33f33d1bcdc2583a6c8ae603eafe6aea64c5052 Mon Sep 17 00:00:00 2001 From: oobjectt Date: Fri, 17 Mar 2023 23:26:56 +0100 Subject: [PATCH] #138 - Motto saves only press Enter --- .../avatar-info/infostand/InfoStandWidgetUserView.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/room/widgets/avatar-info/infostand/InfoStandWidgetUserView.tsx b/src/components/room/widgets/avatar-info/infostand/InfoStandWidgetUserView.tsx index 5f2641c0..cb435119 100644 --- a/src/components/room/widgets/avatar-info/infostand/InfoStandWidgetUserView.tsx +++ b/src/components/room/widgets/avatar-info/infostand/InfoStandWidgetUserView.tsx @@ -1,5 +1,5 @@ import { RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, RoomSessionFavoriteGroupUpdateEvent, RoomSessionUserBadgesEvent, RoomSessionUserFigureUpdateEvent, UserRelationshipsComposer } from '@nitrots/nitro-renderer'; -import { Dispatch, FC, FocusEvent, KeyboardEvent, SetStateAction, useEffect, useState } from 'react'; +import { Dispatch, FC, KeyboardEvent, SetStateAction, useEffect, useState } from 'react'; import { FaPencilAlt, FaTimes } from 'react-icons/fa'; import { AvatarInfoUser, CloneObject, GetConfiguration, GetGroupInformation, GetSessionDataManager, GetUserProfile, LocalizeText, SendMessageComposer } from '../../../../../api'; import { Column, Flex, LayoutAvatarImageView, LayoutBadgeImageView, Text, UserProfileIconView } from '../../../../../common'; @@ -31,8 +31,6 @@ export const InfoStandWidgetUserView: FC = props = setIsEditingMotto(false); } - const onMottoBlur = (event: FocusEvent) => saveMotto(event.target.value); - const onMottoKeyDown = (event: KeyboardEvent) => { event.stopPropagation(); @@ -183,7 +181,7 @@ export const InfoStandWidgetUserView: FC = props = { !isEditingMotto && setIsEditingMotto(true) }>{ motto }  } { isEditingMotto && - ('motto.max.length', 38) } value={ motto } onChange={ event => setMotto(event.target.value) } onBlur={ onMottoBlur } onKeyDown={ onMottoKeyDown } autoFocus={ true } /> } + ('motto.max.length', 38) } value={ motto } onChange={ event => setMotto(event.target.value) } onKeyDown={ onMottoKeyDown } autoFocus={ true } /> } }