courrier clean 2$
This commit is contained in:
parent
88020ccfe5
commit
e95f078bbc
@ -188,13 +188,8 @@ export default function ComposeEmail(props: ComposeEmailAllProps) {
|
|||||||
|
|
||||||
// Focus editor after initializing content
|
// Focus editor after initializing content
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// For new messages, focus the textarea
|
if (editorRef.current && type !== 'new') {
|
||||||
if (!type || type === 'new') {
|
// For replies/forwards, focus contentEditable
|
||||||
const textarea = document.querySelector('textarea');
|
|
||||||
textarea?.focus();
|
|
||||||
}
|
|
||||||
// For replies/forwards, focus the contentEditable div
|
|
||||||
else if (['reply', 'reply-all', 'forward'].includes(type) && editorRef.current) {
|
|
||||||
editorRef.current.focus();
|
editorRef.current.focus();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -214,6 +209,10 @@ export default function ComposeEmail(props: ComposeEmailAllProps) {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error positioning cursor:', e);
|
console.error('Error positioning cursor:', e);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// For new emails, focus the textarea
|
||||||
|
const textarea = document.querySelector('textarea');
|
||||||
|
textarea?.focus();
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user