Closed Bug 1735076 Opened 3 years ago Closed 3 years ago

No indication of button focus when left and right arrow (cursor) keys are used in `Save Message` confirmation prompt

Categories

(Thunderbird :: Message Compose Window, defect, P1)

Thunderbird 91

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
97 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: mozilla, Assigned: emilio)

Details

(Keywords: dataloss, ux-error-prevention)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

  1. Open Write dialog (File->New->Message) and begin to write a message.
  2. Close window to get the "Save Message" modal to pop up.
  3. Left- and right-arrow keys are inoperative, i.e. don't cycle between Save, Discard changes, and Close options as expected in any standard Windows native modal.

Actual results:

Arrow keys don't work to cycle between options; only tab key works.

Expected results:

Save, Discard changes, and Close options should have been highlighted as I cycled between them, just as with the tab key.

Component: Untriaged → General

Indeed, tab works, arrow does not.

Thomas, is this by design?

Flags: needinfo?(bugzilla2007)

(In reply to Wayne Mery (:wsmwk) from comment #1)

Indeed, tab works, arrow does not.
Thomas, is this by design?

Hell no! And it's much worse and more cunning than described: The cursor keys are functional, but there's zero visible indication that the focus has moved to another button. So if for whatever reason I change my mind and want to save the message anyway, invisible focus from arrow keys might be on Discard..., and Enter will discard, but Save is the only button showing blue. Maybe it's this modern thing of showing focus ring only when keyboard is used, which fails to kick in here. Tab shows the correct behaviour.

This is basic functionality seriously broken for keyboard use, and with unexpected danger of dataloss. Maybe a toolkit thing, so probably affects other dialogs, too.

Alex, can you make a plan or otherwise ask someone else?
Richard, any insights?

STR (on Windows 10, 91.4.0 (64-bit))

  1. compose msg
  2. close msg (Alt+F4, or [x] button)
  3. On Save message dialog, press arrow right exactly one time (sic! Ignore that there's no visual feedback per this bug! Do not press Tab before you press arrows)
    This assumes the button sequence on Windows: Save, Discard changes, Cancel. Your OS might have different order, or bug may not occur on other OS.
  4. Press Enter

Actual

  • After step 3, focus has correctly moved to Discard... button, but there's zero indication of the focus change, so only Save default button looks focused
  • Ater step 4, Discard... button is unexpectedly triggered even though it did not have any visible indication of focus, and I actually wanted Save!
  • Dataloss! Message discarded against my will.
  • Using arrow keys is now Russian roulette as user will never see which button really has focus.

Expected

  • Using arrow keys must show and move the focus ring on buttons, not just move the focus without visible indication
  • prevent unexpected dataloss and random unpredictable behaviour
Severity: -- → S2
Status: UNCONFIRMED → NEW
Component: General → Message Compose Window
Ever confirmed: true
Flags: needinfo?(richard.marti)
Flags: needinfo?(bugzilla2007)
Flags: needinfo?(alessandro)
Priority: -- → P1
Summary: Left- and right-arrow keys ignored in Save Message modal (Win32) → No indication of button focus when left and right arrow (cursor) keys are used in `Save Message` confirmation prompt

Does anyone see this on Linux or Mac?

After pressing Tab once (which shows the focus ring), this bug will no longer occur on the current dialog. Which seems to confirm my theory that cursor keys are somehow failing to trigger unhiding the focus ring which is only shown when keyboard gets used.

The same happens on Linux and Mac.

It's not a theme issue as with TAB the focus works. The arrow key move doesn't activate the focus show. When first using TAB and then the arrow keys the focus ring shows and moves until it reaches the end. Pressing the arrow key over the end of the chain disables the focus and nothing is shown further.

Flags: needinfo?(richard.marti)

Uh, good find, this is indeed super weird.
Pinging emilio to see if he knows of any related m-c issue, and if he can redirect us to someone that manages that area to see if it's a toolkit issue, or an implementation issue on our end.

Flags: needinfo?(alessandro) → needinfo?(emilio)

Relevant calls are here:

https://searchfox.org/mozilla-central/rev/21a9b72545da06681db97c4b3a2a6be761f4aae5/toolkit/content/widgets/button.js#42-68

This makes sure to set the FLAG_BYKEY properly if needed, instead of passing
down raw flags to nsFocusManager. Clean up a bit while at it.

Let me know if you want a test for this, but we have tests for programmatic
focus and :focus-visible already, so my gut feeling is that testing this
particular XUL-specific change is not super-worth-it...

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de1608e5f69b Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
Attachment #9255127 - Attachment description: Bug 1735076 - Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=masayuki,smaug → Bug 1735076 - Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93b9da069dde Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0a2735991204 Use ProgrammaticFocusFlags from nsXULCommandDispatcher. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: