Daily 66.0a1 (2019-01-11) (64-bit) context menu of stand-alone message window completely messed up

RESOLVED FIXED in Thunderbird 66.0

Status

defect
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: bugzilla.mozilla.org, Assigned: aceman)

Tracking

Thunderbird 66.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Reporter

Description

5 months ago

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

Steps to reproduce:

When I open a message (in a new window,) highlight a piece of text, and right-click on it, the cut/copy/paste/select-all menu items are NOT enabled. Ctrl-C will copy the selected text, but the context menu seems broken.

There are also a lot of things the context menu that I do not expect.

The current release of TBird does not have these problems (they share the same user profile)

Actual results:

cut/copy/paste/select-all are disabled

Expected results:

cut/copy/paste/select-all should be enabled

Reporter

Comment 1

5 months ago

Here is a screen shot

Comment 2

4 months ago

Confirmed, looks terrible. Thanks for reporting and thank for being on the bumpy Daily ride.

Richard, can you take a look.

Status: UNCONFIRMED → NEW
Component: Untriaged → Message Reader UI
Ever confirmed: true
Flags: needinfo?(richard.marti)
Summary: Daily 66.0a1 (2019-01-11) (64-bit) message window context menu cut/copy/paste not enabled → Daily 66.0a1 (2019-01-11) (64-bit) context menu of stand-alone message window completely messed up

Comment 3

4 months ago

BTW, debug console shows this:
JavaScript error: chrome://messenger/content/nsContextMenu.js, line 89: TypeError: document.getElementById(...) is null
JavaScript error: chrome://messenger/content/mailContextMenus.js, line 55: TypeError: gContextMenu is undefined

Sadly the error console is broken right now, bug 1519625.

nsContextMenu.js, line 89 is
tab: document.getElementById("tabmail").currentTabInfo,

so that will have as a consequence that gContextMenu won't get defined.

Alice, can you please narrow this down for us a little.

Flags: needinfo?(richard.marti) → needinfo?(alice0775)

Comment 5

4 months ago

Thanks Alice, much appreciated as always.

Flags: needinfo?(geoff)
Assignee

Comment 6

4 months ago

(In reply to Jorg K (GMT+1) from comment #3)

BTW, debug console shows this:
JavaScript error: chrome://messenger/content/nsContextMenu.js, line 89: TypeError: document.getElementById(...) is null
JavaScript error: chrome://messenger/content/mailContextMenus.js, line 55: TypeError: gContextMenu is undefined

nsContextMenu.js, line 89 is
tab: document.getElementById("tabmail").currentTabInfo,

I'd guess there is no id="tabmail" element in the standalone window. Yes, this line was added in Bug 1503421.

Assignee

Comment 7

4 months ago
Posted patch 1519465.patchSplinter Review

This fixes the immediate problem and makes the context menu work.
But I don't know what effect it has on the webExtensions and whether the 'tab' should contain something else in this case.

Assignee: nobody → acelists
Attachment #9036168 - Flags: review?(geoff)

Comment 8

4 months ago

Comment on attachment 9036168 [details] [diff] [review]
1519465.patch

This doesn't look grossly wrong, so I'm stealing this. Let's see there the linter wants the ? :

Flags: needinfo?(geoff)
Attachment #9036168 - Flags: review?(geoff) → review+

Comment 9

4 months ago

Comment on attachment 9036168 [details] [diff] [review]
1519465.patch

Geoff can check it too.
Correction to previous sentence:
Let's see where the linter wants the ? :

Attachment #9036168 - Flags: review?(geoff)

Comment 10

4 months ago

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/4f89930a06e5
Don't access non-existent tabmail when building context menu for a stand-alone message window. r=jorgk

Status: NEW → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED

Updated

4 months ago
Target Milestone: --- → Thunderbird 66.0
Attachment #9036168 - Flags: review?(geoff) → review+
You need to log in before you can comment on or make changes to this bug.