UI regression with popup windows

Ask for help about NoScript, no registration needed to post
User avatar
ZeroUnderscoreOu
Posts: 12
Joined: Sat Aug 26, 2017 1:19 am
Contact:

UI regression with popup windows

Post by ZeroUnderscoreOu »

When a site opens a new page in a popup window with minimal controls, there is no easy way to check/set script permissions for that new page. In case that page requires new permissions, it will not work properly until reopened in a new tab, where NoScript controls are available.

I made a test case to illustrate this issue. NS_Parent has a button that changes color constantly to indicate that scripts are running. Page requires zerounderscoreou.github.io to be trusted. Clicking the button opens NS_Popup in a popup window. The page is empty but it will change color constantly, similarly to the opening button, when scripts are running. It also requires cdn.jsdelivr.net to be trusted for scripts to run. You will not be able to set that permission, however, because NoScript toolbar icon is hidden and clicking NoScript context menu opens settings for the parent page (stealing focus), which does not require cdn.jsdelivr.net and doesn't have it in the list of domains. The only way to see an updated list of domains is to reopen NS_Popup in a normal window (you can also Ctrl+Click on the button to load it in the same window).

In case my explanation was not clear, I can make a video showcasing this issue.
0_o
Mozilla/5.0 (X11; Linux i686; rv:100.0) Gecko/20100101 Firefox/100.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: UI regression with popup windows

Post by barbaz »

Your explanation is clear, I know what you're talking about and have hit the same issue. It's not a regression, it has always been this way.

What browser are you using?

If Firefox, you can work around this using userChrome.css (requires about:config > toolkit.legacyUserProfileCustomizations.stylesheets set to true). Here's mine -

Code: Select all

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

/* Un-hide Toolbars In Popups (DON'T apply to WebExtension-created windows!) .......*/
*|*:root:not([chromehidden=""]):not([chromehidden~="location"]) *:is(#PersonalToolbar, .chromeclass-toolbar-additional:not([hidden="true"])) {
  display: -moz-box !important;
}
A better solution, and one that in theory would work in all supported browsers, would be viewtopic.php?t=26249
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
ZeroUnderscoreOu
Posts: 12
Joined: Sat Aug 26, 2017 1:19 am
Contact:

Re: UI regression with popup windows

Post by ZeroUnderscoreOu »

I call this a regression because there is a UI element that is otherwise functioning but not in this particular case.

Yes, I use Firefox. Thanks for suggestion, but I'd prefer to avoid using userChrome.

I agree that logging console would be a nice addition and could help in cases of multiple redirections. But I think in this case parent window's list of domains (in NoScript menu) should be populated with domains required by popups.
0_o
Mozilla/5.0 (X11; Linux i686; rv:100.0) Gecko/20100101 Firefox/100.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: UI regression with popup windows

Post by Giorgio Maone »

Please check latest development build:

v 11.4.15rc1
============================================================
x Always open the windowed standalone UI when invoked from
the contextual menu (thanks ZeroUnderscoreOu for
reporting)
Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0
User avatar
therube
Ambassador
Posts: 7924
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: UI regression with popup windows

Post by therube »

Pretty neat testcase :-).

11.4.15rc1 looks to work.
(And I'll note that legacy XUL NoScript also works. Don't know if that's good or bad?)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0
User avatar
ZeroUnderscoreOu
Posts: 12
Joined: Sat Aug 26, 2017 1:19 am
Contact:

Re: UI regression with popup windows

Post by ZeroUnderscoreOu »

therube wrote: Tue Jan 17, 2023 8:31 pm Pretty neat testcase :-).
Thanks :)

And thank you Giorgio for the fix.
0_o
Mozilla/5.0 (X11; Linux i686; rv:100.0) Gecko/20100101 Firefox/100.0
Post Reply