Closed Bug 1695953 Opened 4 years ago Closed 2 years ago

context menu can't be opened with keyboard in openpgp key manager

Categories

(MailNews Core :: Security: OpenPGP, defect)

defect

Tracking

(thunderbird_esr102 wontfix)

RESOLVED FIXED
115 Branch
Tracking Status
thunderbird_esr102 --- wontfix

People

(Reporter: ilusha.paschuk, Assigned: danilocesar1002)

Details

Attachments

(1 file, 2 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

  1. start openpgp key manager
  2. locate any key in the main tree view with help of the keyboard
  3. press shift+f10

Actual results:

nothing (context menu didn't appear)

Expected results:

context menu of the tree item should open, as if on right mouse click

Component: Untriaged → Security: OpenPGP
Product: Thunderbird → MailNews Core

Originally, the context menu was associated with the treechildren element. It's not clear why, but the context-menu keyboard shortcut did not reach the treechildren element, while the right click did. Moving the context menu element to the tree makes both mouse click and keyboard work, without any negative side effects.

This commit adds a new file and directory for tests related to the key manager. The only test we added was one that checks for the presence of the context menu element using a regular expression. Other approaches to reach this code change didn't seem possible, based on our investigation.

Assignee: nobody → danilocesar1002
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

We tried to replicate the problem, and test the fix by using Mochitest. The idea was to open the key manager and synthesize the various possible context-menu keyboard shortcuts, then checking the result. That didn't work: we failed to synthesize the shortcut. It seems something is catching Shift-F10 at a low level in the code base - it doesn't work the same as other keyboard shortcuts. Our second approach was to parse the XHTML XUL file and verify the changes we made in the resulting document. That approach failed because it doesn't seem possible to parse the XHTML from xpcshell, since the file can't be validated. The final attempt was to test the fix by verifying the text directly with a regular expression, and this is the test that we included in the commit.

We know that the key manager is close to being deprecated, and will at some point be remade. However, until that happens, we believe it is useful to have some regression tests for issues found there.

Depends on D178072

Attachment #9333928 - Attachment is obsolete: true

(In reply to César Pedraza from comment #2)

We know that the key manager is close to being deprecated, and will at some point be remade.

I don't think so. I cannot predict if the key manager will be remade, might not happen in the near future.

Attachment #9333682 - Attachment is obsolete: true
Target Milestone: --- → 115 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/289fe3fd7e24
Fix the issue by moving the context menu to enclosing tree. r=kaie

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

Attachment

General

Creator:
Created:
Updated:
Size: