Closed Bug 1719531 Opened 3 years ago Closed 3 years ago

Remove no-op focus handling in `fromKeyPress()`

Categories

(Thunderbird :: Message Compose Window, task)

task

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
91 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: thomas8, Assigned: thomas8)

References

Details

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1653814 +++

Thanks Henry for questioning the focus handling in fromKeyPress()!

I found that except for Enter, all of the focus handling in fromKeyPress() has become no-op, so we can just scrap the whole thing :-)

After moving Reply-To field to come first after From field in Bug #1653814, afsics it is no longer possible that tab-focus needs special handling to skip pills and jump directly from From to a first address input whose address row does not have a close button because it's mandatory for the current message type (e.g. the To row for mail messages):

  • As long as reply-to address row is hidden, there will be >> in the toolbar which is reached via default focus flow
  • >> will only go away when all possible address rows are shown, i.e. reply-to will be the first row, and it has a close button always shown which is also reached via default focus flow.
Summary: Remove no-op focus handling from `fromKeyPress()` → Remove no-op focus handling in `fromKeyPress()`
Attached patch 1719531_fromKeyPressCleanUp.diff (obsolete) — Splinter Review

Bug 1719531 - Remove no-op focus handling in fromKeyPress() and fix focus behaviour on Enter. r=aleca

This removes the no-op code and ensures that pressing Enter on From field will always focus the first available address row, also if that's Newsgroup or Reply-To.

Attachment #9230156 - Flags: review?(alessandro)
Comment on attachment 9230156 [details] [diff] [review]
1719531_fromKeyPressCleanUp.diff

Review of attachment 9230156 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/compose/content/MsgComposeCommands.js
@@ +7882,3 @@
>      document
> +      .getElementById("recipientsContainer")
> +      .querySelector(".address-row:not(.hidden) .address-input[recipienttype]")

`document.querySelector("#recipientsContainer .address-row:not(.hidden) .address-input[recipienttype]")`
Comment on attachment 9230156 [details] [diff] [review]
1719531_fromKeyPressCleanUp.diff

Review of attachment 9230156 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, with Henry's suggestion for a single querySelector.
Thanks
Attachment #9230156 - Flags: review?(alessandro) → review+

Yep!

Attachment #9230540 - Flags: review+
Attachment #9230156 - Attachment is obsolete: true

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/938f0f847eac
Remove no-op focus handling in fromKeyPress() and fix focus behaviour on Enter. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: