v0.11.22 bug fix

This commit is contained in:
2026-03-22 15:06:03 -04:00
parent 300cf5d869
commit ca470f1bb6
4 changed files with 21 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "jama-frontend",
"version": "0.11.21",
"version": "0.11.22",
"private": true,
"scripts": {
"dev": "vite",

View File

@@ -47,7 +47,24 @@ export default function MessageInput({ group, replyTo, onCancelReply, onSend, on
return () => document.removeEventListener('mousedown', handler);
}, []);
// Handle typing notification
// Reset input state when switching to a different conversation
useEffect(() => {
setText('');
setImageFile(null);
setImagePreview(null);
setLinkPreview(null);
setMentionSearch('');
setMentionResults([]);
setShowMention(false);
wasTyping.current = false;
onTextChange?.('');
if (inputRef.current) {
inputRef.current.style.height = 'auto';
inputRef.current.style.overflowY = 'hidden';
}
}, [group?.id]); // eslint-disable-line react-hooks/exhaustive-deps
const handleTypingChange = (value) => {
if (value && !wasTyping.current) {
wasTyping.current = true;