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
|
||||
setTimeout(() => {
|
||||
// For new messages, focus the textarea
|
||||
if (!type || type === 'new') {
|
||||
const textarea = document.querySelector('textarea');
|
||||
textarea?.focus();
|
||||
}
|
||||
// For replies/forwards, focus the contentEditable div
|
||||
else if (['reply', 'reply-all', 'forward'].includes(type) && editorRef.current) {
|
||||
if (editorRef.current && type !== 'new') {
|
||||
// For replies/forwards, focus contentEditable
|
||||
editorRef.current.focus();
|
||||
|
||||
try {
|
||||
@ -214,6 +209,10 @@ export default function ComposeEmail(props: ComposeEmailAllProps) {
|
||||
} catch (e) {
|
||||
console.error('Error positioning cursor:', e);
|
||||
}
|
||||
} else {
|
||||
// For new emails, focus the textarea
|
||||
const textarea = document.querySelector('textarea');
|
||||
textarea?.focus();
|
||||
}
|
||||
}, 100);
|
||||
} catch (error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user