When link to same domain is opened in a new tab, always keep the same
container without asking.
This commit is contained in:
parent
99db192792
commit
fb7c6355d0
1 changed files with 13 additions and 0 deletions
|
@ -136,6 +136,19 @@ const assignManager = {
|
|||
this.deleteContainer(siteSettings.userContextId);
|
||||
return {};
|
||||
}
|
||||
|
||||
// If a page has been opened in a nonstandard container, the exemption flag for that
|
||||
// tab will have been set, so following links in the same tab will not trigger new
|
||||
// prompts about the container in which to open the page. However, opening links
|
||||
// in a new tab will not be subject to this protection.
|
||||
// To prevent this, explicitly allow requests that don't change host to go through.
|
||||
if(options.originUrl) {
|
||||
const originUrl = new window.URL(options.originUrl);
|
||||
const newUrl = new window.URL(options.url);
|
||||
if(originUrl.hostname === newUrl.hostname)
|
||||
return {};
|
||||
}
|
||||
|
||||
const userContextId = this.getUserContextIdFromCookieStore(tab);
|
||||
if (!siteSettings
|
||||
|| userContextId === siteSettings.userContextId
|
||||
|
|
Loading…
Add table
Reference in a new issue