Infocatcher / Private_Tab

Adds private tabs, restartless extension for Firefox (20.0+) and SeaMonkey (2.17+)
https://addons.mozilla.org/addon/private-tab/
Other
86 stars 20 forks source link

Single Private Tab in new Window #39

Closed kainsavage closed 11 years ago

kainsavage commented 11 years ago

When you have a single tab set as a private tab in a secondary window, then close said window, the entry still goes into the "recently closed windows" as if it were NOT a private session.

This may not be the focus of your extension directly. I am the author of a Firefox extension called HistoryBlock and someone pointed me to your extension as a means for handling a lot of my private browsing requirements. Your extension handles them all perfectly (opening a new tab, detecting whether it is blacklisted and toggling private tab if so, etc) except for the new window use case:

User opens a link in a new window Link is blacklisted History is purged and private tab is toggled on User closes said window, but the History -> Recently Closed Windows -> [entry] remains.

Infocatcher commented 11 years ago

Not only with HistoryBlock, the same happens after closing of not private window without not private tabs. Anyway, seems to be fixed for me after changes for #36 and 24f2f6b07611c3275d4c2d1b5c39b9077e76a1ab commit.

kainsavage commented 11 years ago

I pulled the changed from #36 and ran my test again; it is close, but still not quite right. Now, there is an entry in Recently Closed Windows called:

"New Tab (and 1 other tab)."

When I open this window, it shows the new tab, and the same private tab that was closed. This implementation is slightly better than the previous one, but still not 100% correct.

Infocatcher commented 11 years ago

I pulled the changed from #36

Hmmm... only these changes or whole latest development version? Or how can I repeat your tests?

Infocatcher commented 11 years ago

Also be careful: if you make already opened tab private, tab will be loaded with not private cookies. For example, following pattern will fail:

var tab = gBrowser.addTab();
makeTabPrivate(tab);
kainsavage commented 11 years ago

I pulled the latest from this github in readonly and built the plugin myself, so it should be entirely up-to-date.

Test instructions: 1) Open Link in New Window 2) Call 'privateTab.toggleTabPrivate([thatTab], true);' on that page. 3) Close that window 4) History -> Recently Closed Windows -> New Tab (and 1 other tab).

This will open the window from TestInstruction#1 with 2 tabs in it - the private tab and an about:blank tab.

kainsavage commented 11 years ago

Also be careful: if you make already opened tab private, tab will be loaded with not private cookies. For example, following pattern will fail:

var tab = gBrowser.addTab(); makeTabPrivate(tab);

That is very good to know, thank you. It seems that my VERY simple redesign of HistoryBlock will need to be reevaluated as I am simply toggling the private mode on page load (which fulfills the need of keeping it out of the closed tabs, and I blank the history manually, so that's fine, but the cookies and presumably cache will remain). Basically, I need to test a url before a tab is opened to see if it should be private, then open the tab as such... interesting.

Infocatcher commented 11 years ago

Test instructions:

Strange, still can't reproduce. Can you reproduce this bug on new clean Firefox profile with only one Private Tab extension?

I pulled the latest from this github in readonly

Hmmm... to be really sure, here is latest development version: private_tab-0.1.1pre16-fx-sm.xpi from "master" branch (only changed version to 0.1.1pre).