Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] drag&drop between non-private and private windows #4

Closed
nhantrn opened this issue Mar 16, 2013 · 6 comments
Closed

[bug] drag&drop between non-private and private windows #4

nhantrn opened this issue Mar 16, 2013 · 6 comments

Comments

@nhantrn
Copy link

nhantrn commented Mar 16, 2013

There seems to be a bug that reset a private window's state when I drag&drop from a non-private windows to a private window.
This does not happen when I disable the extension.

Infocatcher added a commit that referenced this issue Mar 16, 2013
This is workaround, I don't know the real reason of this bug...
(related to #4)
@Infocatcher
Copy link
Owner

This is "by design": preserved private state (used state of selected tab when drag-and-drop starts) of dragged link-like things.
So you can open link or plain text link in private tab (and from private tab) using drag-and-drop.
But I see bug in this logic: should be fixed by aa9ae85 commit.

Anyway, there is some questions:

  1. We open link from private tab (using middle-click for example) => it should always becomes private
  2. We drag-and-drop link from private tab to tab bar in private window => new tab should becomes private
  3. We drag-and-drop link from private tab to tab bar in regular window => now new tab becomes private
  4. We drag-and-drop link from private tab to not private tab => now tab (or opened tab) becomes private

And vice versa:

  1. We open link from regular tab (using middle-click for example) => it should always becomes not private
  2. We drag-and-drop link from regular tab to tab bar in regular window => new tab should becomes not private
  3. We drag-and-drop link from regular tab to tab bar in private window => now new tab becomes not private
  4. We drag-and-drop link from regular tab to private tab => now tab (or opened tab) becomes not private

What we should do in 3 and 4 cases?

But private window may contains not private (regular) tabs. And not private window may looks very similar...
("Private" for window means internal nsILoadContext.usePrivateBrowsing == true for this window)
New tabs in private window becomes private too. And no other visual difference between private and not private window...

@nhantrn
Copy link
Author

nhantrn commented Mar 16, 2013

I think you should just revert to firefox's default action:

When you drag&drop from/to non-private tab/window <---> private tab/window, it should obey the destination's state. And vice versa.

That's what firefox does by default.

Infocatcher added a commit that referenced this issue Mar 17, 2013
extensions.privateTab.dragAndDropUseTargetPrivateState
(for #4)
@Infocatcher
Copy link
Owner

I'm added extensions.privateTab.dragAndDropUseTargetPrivateState preference to use source private state instead of target.
Disabled by default: I'm still prefer to leave everything from private tab private too.

@Infocatcher
Copy link
Owner

You can try 0.1.0b2 version: https://addons.mozilla.org/addon/private-tab/versions/0.1.0b2

Infocatcher added a commit that referenced this issue Mar 25, 2013
optimization for previous commit (568a599)
(related to #4)
Infocatcher added a commit that referenced this issue Mar 25, 2013
+ rename "dragAndDropUseTargetPrivateState" => "dragAndDropBehavior"
(related to #4)
@Infocatcher
Copy link
Owner

Preference was renamed:
extensions.privateTab.dragAndDropUseTargetPrivateState
=> extensions.privateTab.dragAndDropBehavior:
0 - (default) make new (or target) tab private, if source or target are private
1 - use source private state
2 - use target private state

@Infocatcher
Copy link
Owner

I think, may be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants