Closed Bug 1689985 Opened 3 years ago Closed 3 years ago

Context menu fails to open for 'View Source' on TB 86+: Error win.openContextMenu is not a function

Categories

(Thunderbird :: Message Reader UI, defect)

Thunderbird 86
defect

Tracking

(thunderbird_esr78 unaffected, thunderbird86 affected)

RESOLVED FIXED
87 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird86 --- affected

People

(Reporter: office, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

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

Steps to reproduce:

Open "View Source" window, mouse left-click.

Actual results:

Popup window does not shows.

Expected results:

Popup window allows to copy text, etc.

OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

After mouse left-click:

TypeError: win.openContextMenu is not a function ContextMenuParent.jsm:17:9
receiveMessage resource:///actors/ContextMenuParent.jsm:17
(Async: JSActor query)
handleEvent resource:///actors/ContextMenuChild.jsm:727

Summary: Copy, Select All.. popup window does not show after mouse left-click in View Source window → Copy, Select All.. popup window does not show after mouse right-click in View Source window

I mean mouse-right click...

Thank you Ernestas! Confirming for Daily 87.0a1 (2021-01-31) (64-bit).
Per reporter, also fails on Beta 86. Works on TB 78.
As a workaround, please use well-known keyboard shortcuts like Ctrl+C, Ctrl+A, F3 for Find...

TypeError: win.openContextMenu is not a function ContextMenuParent.jsm:17:9
receiveMessage resource:///actors/ContextMenuParent.jsm:17
(Async: JSActor query)
handleEvent resource:///actors/ContextMenuChild.jsm:727

NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDocShell.domWindow] browsing-context.js:390
get window resource://devtools/server/actors/targets/browsing-context.js:390
_getWindowForBrowserConsole resource://devtools/server/actors/webconsole.js:274
get global resource://devtools/server/actors/webconsole.js:257
makeDebuggeeValue resource://devtools/server/actors/webconsole.js:497
arguments resource://devtools/server/actors/webconsole.js:2070
map self-hosted:221
prepareConsoleMessageForRemote resource://devtools/server/actors/webconsole.js:2069
onConsoleAPICall resource://devtools/server/actors/webconsole.js:1794
onConsoleAPICall self-hosted:1177
observe resource://devtools/server/actors/webconsole/listeners/console-api.js:94
CS_recordEvent resource://gre/modules/ConsoleAPIStorage.jsm:123
reportException resource://devtools/shared/ThreadSafeDevToolsUtils.js:82
reportDebuggerHookException resource://devtools/server/actors/utils/make-debugger.js:93
openContextMenu chrome://messenger/content/nsContextMenu.js:107
receiveMessage resource:///actors/ContextMenuParent.jsm:17
(Async: JSActor query)
handleEvent resource:///actors/ContextMenuChild.jsm:727

Severity: -- → S4
Status: UNCONFIRMED → NEW
Component: Untriaged → Message Reader UI
Ever confirmed: true
Hardware: x86_64 → All
Summary: Copy, Select All.. popup window does not show after mouse right-click in View Source window → Context menu fails to open for 'View Source' on TB 86+: Error win.openContextMenu is not a function

On nightly I don't get an error message. But no context menu either.

Keywords: regression
Regressed by: tb-fission

It looks like OpenContextMenu isn't available in the window, looks like it maybe needs nsContextMenu.js importing into the scope?

Yep, that's what's needed.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
OS: Windows 10 → All
Target Milestone: --- → 87 Branch

The test part depends on bug 1687665.

Attachment #9201508 - Flags: review?(alessandro)
Depends on: 1687665
Comment on attachment 9201508 [details] [diff] [review]
bug1689985_viewsourcecontext.patch

Review of attachment 9201508 [details] [diff] [review]:
-----------------------------------------------------------------

Yes, this fixes the issue.
Attachment #9201508 - Flags: review?(alessandro) → review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/70cf78e945b5
make view source context menu work again. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/118526ef6911
followup - fix linting. rs=eslint DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: