Open
Bug 1482855
Opened 7 years ago
Updated 3 years ago
Explore if focus after closing contacts sidebar can be improved
Categories
(Thunderbird :: Message Compose Window, enhancement)
Thunderbird
Message Compose Window
Tracking
(Not tracked)
NEW
People
(Reporter: thomas8, Unassigned)
Details
+++ This bug was initially created as a clone of Bug #1482718 +++
(In reply to Richard Marti (:Paenglab) from bug 1482718 comment #6)
> Not a issue by this patch because it's already without it but should need
> considering in a new bug: When the focus was on the "To" field and I open
> the contacts pane and decide to not use it and close it again, the focus
> jumps to the "Subject" field. We should set the focus again to the "To"
> field when it is empty. When it's filled, it's okay to focus the "Subject"
> field.
Yeah. Maybe focus should go back to where it was before contacts sidebar was opened? That's what current code is trying to do, but failing. The subject thing is explicitly coded. Focusing recipient fields might be tricky in case of users with auto-BCC set for their accounts. In that case, there's an (Auto-)BCC-recipient already, which normally means that no "proper" recipient has been defined yet. TB knows auto-BCCs which it added and should take that into account.
https://dxr.mozilla.org/comm-central/rev/e5e1510b8d914bfa8439b21ba3f73e4f2e83e957/mail/components/compose/content/MsgComposeCommands.js#6548-6561
// If nothing is focused in the main compose frame, focus subject if empty
// otherwise the body. If we didn't do that, focus may stay inside the closed
// Contacts sidebar and then the main window/frame does not respond to accesskeys.
// This may be fixed by bug 570835.
let composerBox = document.getElementById("headers-parent");
let focusedElement = composerBox.querySelector(":focus") ||
composerBox.querySelector('[focused="true"]');
if (focusedElement) {
focusedElement.focus();
} else {
if (!GetMsgSubjectElement().value)
SetMsgSubjectElementFocus();
else
SetMsgBodyFrameFocus();
}
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•