Closed Bug 1749667 Opened 2 years ago Closed 2 years ago

Keyboard commands broken by bug 371900

Categories

(Thunderbird :: Upstream Synchronization, defect)

defect

Tracking

(thunderbird_esr91 unaffected)

RESOLVED FIXED
98 Branch
Tracking Status
thunderbird_esr91 --- unaffected

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

We've lost a bunch of functionality. The following tests are failing:

  • comm/mail/components/addrbook/test/browser/new/browser_edit_photo.js which involves pasting on an element that has focus but isn't an input element (I'm not entirely sure if this is supposed to work, but it used to)
  • comm/mail/components/extensions/test/browser/browser_ext_commands_onCommand.js which assigns Ctrl+Alt+V to an extension
  • comm/mail/test/browser/attachment/browser_attachment.js which uses Ctrl+A
  • comm/mail/test/browser/composition/browser_contactsSidebar.js which presses Delete on a XUL tree
  • possibly some of the other tests in the same folder as the previous one

I've done a local backout of bug 371900 and the tests pass again. I'm not sure where to go from here.

I've managed to trick some of the things into working again by removing XUL keys such as <key id="key_delete" keycode="VK_DELETE"/> in the contacts sidebar. This seems less than ideal.

Some commands -- the ones in editMenuOverlay.js that were changed by bug 371900 -- are special in that they have a key/menu defined in the <keyset> or menu, but the actual key handling behaviour is done via the ones in ShortcutKeyDefinitions.cpp. To accommodate this before patch 371900 there was a special-case that would ignore keys that didn't have a command or oncommand associated with it, however there are cases where you want to use an event listener defined separately. So, now, post-371900, those key elements are not ignored so nothing will happen.

Instead, you need to add internal="true" to those keys. For example, I tried adding internal="true" to the key "key_selectAll" that is defined in mainKeySet.inc.xhtml and this allowed the test browser_attachment.js to now pass.

There seems to be quite a few different files where this key and others are defined with no associated command handler, so I assume fixing all those up would fix these tests.

Working on a patch for this.

Assignee: nobody → alessandro
Status: NEW → ASSIGNED

It seems the Geoff beat me to it.

Assignee: alessandro → geoff

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/6417eea12df0
Add internal="true" to XUL keys without command or oncommand attributes. r=aleca

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

I hope that's the end of it. It fixed the broken tests locally. Has it broken any others? Only time will tell!

Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: