#2581 ✓fixcommitted
Eric Sharakan

Managing focus using tab & shift-tab not behaving correctly

Reported by Eric Sharakan | June 2nd, 2020 @ 01:36 PM

I have the "use keyboard navigation to move focus between controls" option in the Shortcuts pane of the Keyboard system preference pane enabled. I use this a lot in many Apps, including MM.

Recently, I've found it's no longer working correctly in MM. It used to round-robin through the various panes and controls/focus points within those panes, but not anymore. It's like the focus gets lost after I hit tab or shift-tab a few times, and then no matter how many times I continue to hit it, none of the controls become visibly enabled.

However, it does appear some focus is still set. I noticed my keyboard shortcut to delete a message ('d') sometimes works even when it doesn't visibly appear the message metadata line has the focus. Other times, the same key moves down to the next message in the list. There is just no visible indication of which control has the focus. It's rather unsettling for someone like me who relies heavily on tabbing through the various controls.

I'm running r5690.

Comments and changes to this ticket

  • benny

    benny June 2nd, 2020 @ 02:18 PM

    • State changed from “new” to “reproduced”

    This is a known issue in the new message view (not released yet) and maybe the same issue crept into the old message view. I'll look into it for the new message view and then we'll see if it also fixes it for the old one.

    (In the new message view, both round-robin fails and shift-tab'ing out of the message view -- which I find annoying myself :) .)

  • benny

    benny June 4th, 2020 @ 12:08 PM

    • State changed from “reproduced” to “fixcommitted”

    (There is still likely to be an issue with the old message view although I wasn't able to reproduce it properly. Also, the new message view has the ability to focus each message if multiple messages are selected, but this is not fully implemented. The most important part works: Tab into the message view, use keyboard to scroll, shift-tab back to message list.)

  • Eric Sharakan

    Eric Sharakan July 10th, 2020 @ 06:41 PM

    I do still see something resembling this issue now that I'm running with the new message view enabled. The exact symptoms have changed a little, but the overall issue still exists.

  • benny

    benny July 11th, 2020 @ 06:52 AM

    • State changed from “fixcommitted” to “cantreproduce”

    Do you see the problem in the mailbox window, the single message window, or both (if you use both)?

    Let me know if you can reproduce it.

  • Eric Sharakan

    Eric Sharakan July 11th, 2020 @ 09:44 PM

    It happens as I tab from control to control throughout all the panes of the main MM window.

    I played with it some more in r5698 with the new message view active. The behavior I'm about to describe is 100% reproducible. Let me try to explain in detail. Here's what I see:

    I start with the focus on the contents of the current message. If I continue to hit the tab key, different portions of the interface become in focus (i.e. get that little blue border around it), starting with URLs in the message itself, then switching to the toolbar icons at the top of the window, then to the subject of the message in the tab bar (I only have one tab active). Once the focus gets to the subject in the tab bar, further presses of the tab key seemingly have no effect; the subject in the tab bar remains in focus. If I then start pressing shift-Tab, the process reverses itself, until it cycles through the URLs in the current message again (from bottom to top). Once it gets to the top of the message, continued pressing of shift-Tab causes the focus to cycle only through the URLs of the current message.

    Here's what I would have expected (and how it worked in older builds of MM): The elements selected as the tab (or shift-Tab) key is repeatedly typed should include all the "focus"able elements of all panes of the entire window, after which it should wrap back to the beginning and continue to cycle through over and over.

    Neither of these things are happening. First, as described above, with continued typing of tab, the movement of the item with focus stops entirely when it hits the subject of the tab bar. With shift-tab, the focus eventually gets "stuck" in a round-robin through only the elements in the current message pane. Second, items like the chosen mailbox in the left pane and the chosen message in the header pane never get selected.

    Now, starting over, if I begin with the focus on the currently selected mailbox in the left pane, the sequence of interface elements selected as I continually type tab or shit-Tab is somewhat different than what I explained above. First, now it includes the chosen message in the header pane as it cycles through. However, for some presses of the tab key, the focus doesn't seem to move, and for other presses, no interface element appears to get the focus.

    It's as if there are multiple, different (but overlapping) sequences of interface elements configured to be cycled through via tab or shift-tab.

    I hope this helps.

  • Eric Sharakan

    Eric Sharakan July 13th, 2020 @ 01:57 PM

    Hi, another wrinkle on this. The above behavior was all observed while I was viewing the email notification about this ticket. That was a multipart message that included several URLs in it.

    If I choose another email, a simple text email with no html part, no urls, etc., and start with the focus in the message text window, hitting tab or shift-tab does nothing. No other interface elements ever get selected.

    If I start with the focus on the currently selected mailbox in the left pane as I described in the second-to-last paragraph above, I see the same symptoms I noted above.

  • benny

    benny July 13th, 2020 @ 02:24 PM

    • State changed from “cantreproduce” to “fixcommitted”

    The key view loop in the main window is supposed to be “Toolbar Search > Mailboxes > Message list -> Message View”. Tab'ing to URLs should only happen if focus is in the message view and alt+tab is hit. The latter does not work perfectly yet, that is, the loop is often broken. This is not (yet) a high priority. It's the tab'ing between mailboxes/messages/message that must work.

    I believe I've found the trigger though. It appears that when in a tab'ed window (and a single window in full screen perhaps?) then Apple code asks windows to recalculate their key view loop even if I've set autorecalculatesKeyViewLoop to false. I'm not sure if this is by design or a bug, but I've worked around it in the mailboxes window for now (this should also affect the old message view in the main window). The single message window does not work well with tab'ing, but this is simply because I haven't implemented it yet.

    Thanks for the details to help me find the trigger.

  • Eric Sharakan

    Eric Sharakan July 13th, 2020 @ 02:40 PM

    Thanks Benny. Based on your analysis (and the fact I rarely use multiple tabs), I've hidden the tab bar and that has improved things.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket