Unable to utilize "View page source" option in context menu in sidebar.
Categories
(Firefox :: Sidebar, defect, P5)
Tracking
()
People
(Reporter: zn7esutb, Unassigned)
Details
Steps to reproduce
-
Enable the sidebar button.
-
browser.sidebarAction.toggle()
-
Invoke the context menu:
-
let keyCodeInteger = 93 // Context Menu Key let buttonInteger = 2 // Secondary Click
-
-
document.dispatchEvent(new KeyboardEvent("keydown", { keyCode: keyCodeInteger })); document.dispatchEvent(new KeyboardEvent("keyup", { keyCode: keyCodeInteger }));
-
document.dispatchEvent(new MouseEvent("mousedown", { button: buttonInteger })); document.dispatchEvent(new MouseEvent("mouseup", { button: buttonInteger }));
-
-
-
Select "View page source".
Actual results
Nothing occurs.
Expected results
I should be able to view the page source. Specifically, it should be invoked in a separate tab, as occurs in standard extension modals.
Comment 1•1 month ago
|
||
Will, is there any expectation that users are able to view-source on sidebar content for e.g. an extension? For the built-in sidebars, this is browser-chrome and I don't think we've ever supported view-source for that kind of content.
Updated•1 month ago
|
Comment 2•1 month ago
|
||
From what I can see, view-source should work in the sidebar. It is supported for extension-provided content in extension popups (e.g. try in the uBlock Origin popup). That said, some extensions override the context menu and therefore view-source
wouldn't be available in this case (which is fine).
Now, it looks like https://addons.mozilla.org/en-US/firefox/addon/side-view/ is a good extension to experiment with this. View-source is available but it throws an error when used:
Uncaught (in promise) TypeError: tabBrowser.addTab is not a function
viewSourceOfDocument chrome://browser/content/browser-commands.js:499
viewSource chrome://browser/content/browser-commands.js:526
<anonymous> chrome://browser/content/browser-context.js:287
Oops. I believe this is what is reported to us here.
Reporter | ||
Comment 3•1 month ago
|
||
Some extensions override the context menu, and therefore
view-source
wouldn't be available in this case (which is fine).
Albeit off-topic, does anyone know of an issue about this? If none exists, would one be acceptable, or does Shift+SecondaryClick override it adequately? I ask because I've yet to see an extension which does so, so can't test it.
Comment 4•1 month ago
|
||
(In reply to Mr. Beedell, Roke Julian Lockhart from comment #3)
Some extensions override the context menu, and therefore
view-source
wouldn't be available in this case (which is fine).Albeit off-topic, does anyone know of an issue about this? If none exists, would one be acceptable, or does Shift+SecondaryClick override it adequately? I ask because I've yet to see an extension which does so, so can't test it.
Ha, nice. TIL about shift + context click
. That indeed reveals the browser context menu (I tried in Tree Style Tab).
Description
•