fix: preserve chat input text across window resize (#4717)
Adds a Recoil atom (chatInputDraftAtom) to store the chat input draft, which persists the text when the chat component unmounts/remounts during mobile/desktop mode transitions. Changes: - Add chatInputDraftAtom to ClientConfigStore - Update ChatTextField to save draft on input change - Restore draft when component mounts - Clear draft when message is sent Closes #3615
This commit is contained in:
@@ -73,6 +73,12 @@ export const chatAuthenticatedAtom = atom<boolean>({
|
||||
default: false,
|
||||
});
|
||||
|
||||
// Stores chat input draft to preserve text across mobile/desktop mode switches
|
||||
export const chatInputDraftAtom = atom<string>({
|
||||
key: 'chatInputDraftAtom',
|
||||
default: '',
|
||||
});
|
||||
|
||||
export const websocketServiceAtom = atom<WebsocketService>({
|
||||
key: 'websocketServiceAtom',
|
||||
default: null,
|
||||
|
||||
Reference in New Issue
Block a user