Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

toolbar icon gone in private browsing window #586

Closed
laniakea64 opened this issue Jul 12, 2016 · 6 comments
Closed

toolbar icon gone in private browsing window #586

laniakea64 opened this issue Jul 12, 2016 · 6 comments

Comments

@laniakea64
Copy link

Environment:
SeaMonkey 2.40
uMatrix self-build from 2ef2505
new profile

STR:

  1. install uMatrix, restart browser
  2. verify that the toolbar icon is visible, which it is by default
  3. File > New > Private Window

Expected results: the uMatrix toolbar icon is visible in both windows

Actual results:
The uMatrix toolbar icon is in the normal window but not present in the private window, not even available under toolbar customize.
Nothing related in Error Console.

@gorhill
Copy link
Owner

gorhill commented Jul 12, 2016

The problem is that the test wintype !== 'navigator:browser' at line 1248 always succeed (i.e. wintype is never navigator:browser). uMatrix gives up trying after 8 tries.

uBO is not affected by the issue, but this is a part I revised in uBO. I do notice a delay before the icon appears in uBO, so probably if uMatrix tried more, it would eventually be able to add its icon to the toolbar.

The code to add the icon in uBO is time-based -- it will give up after a set time, while the code to add the icon in uMatrix is try-based, it currently gives up after 8 tries. Solution will be to bring uBO code to uMatrix regarding toolbar icon handling.

@gorhill
Copy link
Owner

gorhill commented Jul 12, 2016

I could fix the icon issue, but looking closer, there are other more serious issues with both uBO and uMatrix: the content of the popup panel in a private window does not match the web site of the current selected tab. Actually, it appears the popup panel depends on the tab selected on the original, non-private one.

Addendum: the issue does not occur on Nightly, FF stable, and neither Pale Moon.

@gorhill
Copy link
Owner

gorhill commented Jul 13, 2016

I confirm that the cause for the other issue described above is also because the windowtype attribute is not set for the private window. Wherever I look, the FF documentation is clear regarding windowtype:

Browser windows have a window type of navigator:browser.

This is not happening for a private window in SeaMonkey. I wonder if this is a bug in SeaMonkey.

@laniakea64
Copy link
Author

laniakea64 commented Jul 13, 2016

Yep, looks like a SeaMonkey bug - the windowtype of private window is an empty string, that's definitely not right.

EDIT Cursory searching of Bugzilla doesn't turn up anything about this anomaly.

@gorhill
Copy link
Owner

gorhill commented Jul 13, 2016

I have a fix which is to further see if the id attribute is main-window as a fallback in case the windowtype is not navigator:browser. Seems to work fine, but the fix is entirely dependent on my observations using the debugger -- not of any documentation.

gorhill added a commit to gorhill/uBlock that referenced this issue Jul 13, 2016
@laniakea64
Copy link
Author

laniakea64 commented Jul 13, 2016

We've talked to the SeaMonkey devs, and got confirmation that A) this is indeed a SeaMonkey bug (likely affecting much more than just uBlock Origin & uMatrix), and B) your chosen work-around should be stable until it's fixed.

Apparently SeaMonkey is using removal of the windowtype attribute as its way of flagging private windows as private windows 😕

someone will be filing on Bugzilla about this soon, I will update this comment with the link

https://bugzilla.mozilla.org/show_bug.cgi?id=1286672

Noxgrim pushed a commit to Noxgrim/uMatrix that referenced this issue Dec 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants