Closed Bug 1723757 Opened 3 years ago Closed 3 years ago

F6 key handler moves focus incorrectly for some elements.

Categories

(Thunderbird :: Message Compose Window, defect)

defect

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: henry-x, Assigned: henry-x)

References

Details

Attachments

(1 file)

F6 is meant to move the focus to the next main element (https://support.mozilla.org/en-US/kb/keyboard-shortcuts).

Steps to reproduce

  1. Open a new composition.
  2. Add the CC field.
  3. Focus the "Remove the Cc field" button.
  4. Press "F6".

Alternatively:

  1. Add a custom field set through the ""mail.compose.other.header" preference.
  2. Open a new composition.
  3. Add the custom field.
  4. Focus the custom field input.
  5. Press "F6".

Result

Moves the focus back to the "From" field.

Expect

Move the focus to the next row.

Discussion

The SwitchElementFocus method needs an update, and should be made less fragile where possible.

Assignee: nobody → henry
Status: NEW → ASSIGNED

There are also some asymmetries between focusing from the contact panel and to the contact panel. Basically, "Shift + F6" doesn't always reverse "F6", or vis-versa.

Also when starting TB, F6 doesn't seem to switch between folder, thread and message pane in the main window for me.
The only thing I can see happen, is the current tab being selected/deselected.

See Also: → 1728293

(In reply to Onno Ekker [:nONoNonO UTC+1] from comment #2)

Also when starting TB, F6 doesn't seem to switch between folder, thread and message pane in the main window for me.
The only thing I can see happen, is the current tab being selected/deselected.

This bug is for the composition window. I opened Bug 1728293 for what you described in the main window.

Target Milestone: --- → 93 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/95ab3af4c90c
Refactor F6 focus handling. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

(In reply to Magnus Melin [:mkmelin] from comment #6)

Please check linux debug bct4 - https://treeherder.mozilla.org/jobs?repo=comm-central&selectedTaskRun=ZRL5YVAjRYms0BYwHpNhoA.0 which seems new

I can't reproduce it locally, so I can only work with the log https://treeherder.mozilla.org/logviewer?job_id=350431406&repo=comm-central&lineNumber=3859

To give some context, checkFocusCyling checks that focus moves with pressing F6 or Ctrl+Tab. It has 4 boolean parameters which control whether part of the composition window is visible or not (e.g. whether the contacts side pane is open or not). This same check is run for each variation of these parameters. In the logs, out of the 16 runs, 15 pass and only one fails (Test run: {"useTab":true,"attachment":false,"languageButton":true,"contacts":true,"otherHeader":"X-Header1"}).

Moreover, it fails the very first check of checkFocusCycling which is a test that is performed in every run (it tests that F6 takes you from the "To" input to the "Bcc" input). Most of the other checks also fail, and some of these similarly shouldn't depend on the parameters. Only two checks pass, and they are testing that the document.activeElement is the #content-frame, i.e. the message editor has focus. So I would guess that the focus is somehow trapped in the editor. In the logs, there are a bunch of GECKO warnings for editor cpp sources, but I'm not sure what to make of these since I'm not familiar with that code.

See Also: → 1731701
See Also: → 1729714
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: