Closed Bug 1597061 Opened 6 years ago Closed 6 years ago

In standalone mail window F6 generates error message in console

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 72.0

People

(Reporter: iannbugzilla, Assigned: khushil324)

Details

Attachments

(1 file, 3 obsolete files)

STR
1/ Open Thunderbird
2/ Open message in a standalone window
3/ Press F6

Expected result
1/ No error message in error console

Actual result
1/ Following message in error console:
ReferenceError: SwitchPaneFocus is not defined messageWindow.xul:1:1

SwitchPaneFocus function is in mail3PaneWindowCommands.js which is not loaded by messageWindow.xul whereas F6 key is defined in mainKeySet.inc.xul which is loaded by messageWindow.xul
Either F6 key definition should be moved to a location not loaded in messageWindow.xul or the function needs moving to somewhere that is loaded by messageWindow.xul. As far as I can see F6 serves no function in a standalone message window so I would say the former is a better option.

Khushil, is this something you could look into?

Flags: needinfo?(khushil324)
Assignee: nobody → khushil324
Flags: needinfo?(khushil324)
Attachment #9109897 - Flags: review?(mkmelin+mozilla)
Status: NEW → ASSIGNED
Comment on attachment 9109897 [details] [diff] [review] Bug-1597061_move-F6-keys-mainKeySet.patch Review of attachment 9109897 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/base/content/hiddenWindow.xul @@ +74,5 @@ > </stringbundleset> > > <!-- keys are appended from the overlay --> > <keyset id="mailKeys"> > + <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="control,shift"/> I wouldn't think the keys are needed in the hidden window (which is a mac thing). If you don't have the 3pane, there is no pane to switch focus on. ::: mail/base/content/messenger.xul @@ +230,5 @@ > <keyset id="mailKeys"> > + <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="control,shift"/> > + <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="control"/> > + <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="shift"/> > + <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);"/> hmm, looks like we only ever look at shift (or not) - https://searchfox.org/comm-central/rev/9c5877d219fdda7f6ee2ed352973eb779496e272/mail/base/content/mail3PaneWindowCommands.js#1444 Maybe we can do with just the last one of these?
Attachment #9109897 - Flags: review?(mkmelin+mozilla)

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

::: mail/base/content/messenger.xul
@@ +230,5 @@

<keyset id="mailKeys">

  • <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="control,shift"/>
  • <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="control"/>
  • <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);" modifiers="shift"/>
  • <key keycode="VK_F6" oncommand="SwitchPaneFocus(event);"/>

hmm, looks like we only ever look at shift (or not) -
https://searchfox.org/comm-central/rev/
9c5877d219fdda7f6ee2ed352973eb779496e272/mail/base/content/
mail3PaneWindowCommands.js#1444

Maybe we can do with just the last one of these?
What happens with the first two removed and the user is holding down the control key?
Does that change the behaviour the user gets? I think at the moment we ignore the control key.

(In reply to Ian Neal from comment #4)

What happens with the first two removed and the user is holding down the control key?
Does that change the behaviour the user gets? I think at the moment we ignore the control key.

Yes, we ignore the control key. Behaviour remains the same after removing the first two keys.

Attachment #9109897 - Attachment is obsolete: true
Attachment #9109923 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9109923 [details] [diff] [review] Bug-1597061_move-F6-keys-mainKeySet-1.patch Review of attachment 9109923 [details] [diff] [review]: ----------------------------------------------------------------- Doesn't work correctly now with control pressed, so it seems we do need all that we had. r=mkmelin with them added
Attachment #9109923 - Attachment is obsolete: true
Attachment #9109923 - Flags: review?(mkmelin+mozilla)
Attachment #9109939 - Flags: review+

The same thing also happens with Control and Control+Shift TAB. Another patch on here or a new bug?

Let me do it this patch only. We just need this shift this lines in messenger.xul: https://searchfox.org/comm-central/source/mail/base/content/mainKeySet.inc.xul#142-147

Attachment #9110024 - Attachment is patch: true
Comment on attachment 9110024 [details] [diff] [review] Bug-1597061_move-F6-keys-mainKeySet-3.patch - Fix commit message before landing!! [see comment #12] Geoff, in case you land this later, can we please fix the grammar in the commit message: Bug 1597061 - Fixed in standalone mail window F6 generates error message in console. r=mkmelin How about: Fixed error message in console when using F6 in stand-alone mail window
Attachment #9110024 - Attachment description: Bug-1597061_move-F6-keys-mainKeySet-3.patch → Bug-1597061_move-F6-keys-mainKeySet-3.patch - Fix commit message before landing!! [see comment #12]

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/afee24ca2f11
Fix error message in console when using F6 in stand-alone mail window. r=mkmelin

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

Attachment

General

Created:
Updated:
Size: