biancadanforth / tracking-protection-shield-study

A Shield study to determine the optimal messaging, if any, for Tracking Protection in Firefox.
0 stars 3 forks source link

Correctly get topmost window to update pageAction and its panel. Fixe… #148

Closed biancadanforth closed 6 years ago

biancadanforth commented 6 years ago

…s #139.

The Problem: If I have both a private and non-private window open, but the non-private window is currently active/on top, Services.wm.getMostRecentWindow("navigator:browser") would tell me the most recent window is a private window. Per MattN this might be a feature as we want to err on being more Private than less in the case a Private Window is open. He recommends using RecentWindow.jsm instead, which has more options for determining which window is "most recent".

Also sneaking in another fix for a minor issue where the pageAction panel wasn't dismissing on window deactivate.

biancadanforth commented 6 years ago

@pdehaan , can you try this out (note my most recent comment in #139 ). I claim this should fix the incorrect presence/absence of the pageAction button itself in addition to the 0/0 values we were seeing on the pageAction panel.