From 8169922f84d3f95c8db5301a94d0f9e70ac1bca6 Mon Sep 17 00:00:00 2001 From: arun Date: Tue, 4 May 2021 13:55:10 -0400 Subject: [PATCH 1/2] Fixed Name & URI 1 Fields Populated Incorrectly when creating new Login in popout window (# 1816) --- src/popup/vault/add-edit.component.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/popup/vault/add-edit.component.ts b/src/popup/vault/add-edit.component.ts index 0e28beab41..baa4745355 100644 --- a/src/popup/vault/add-edit.component.ts +++ b/src/popup/vault/add-edit.component.ts @@ -76,10 +76,21 @@ export class AddEditComponent extends BaseAddEditComponent { if (!this.editMode || this.cloneMode) { if (params.name && (this.cipher.name == null || this.cipher.name === '')) { - this.cipher.name = params.name; + if (this.popupUtilsService.inPopout(window)) { + this.cipher.name = ''; + } + else { + this.cipher.name = params.name; + } + } if (params.uri && (this.cipher.login.uris[0].uri == null || this.cipher.login.uris[0].uri === '')) { - this.cipher.login.uris[0].uri = params.uri; + if (this.popupUtilsService.inPopout(window)) { + this.cipher.login.uris[0].uri = ''; + } + else { + this.cipher.login.uris[0].uri = params.uri; + } } } if (queryParamsSub != null) { From f556b2a2075d2009411b4f1a658a78bb4fac36aa Mon Sep 17 00:00:00 2001 From: arun Date: Wed, 5 May 2021 13:59:42 -0400 Subject: [PATCH 2/2] Fixed Name & URI 1 Fields Populated Incorrectly when creating new Login in popout window (# 1816) --- src/popup/vault/add-edit.component.ts | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/popup/vault/add-edit.component.ts b/src/popup/vault/add-edit.component.ts index baa4745355..d6f5bd7339 100644 --- a/src/popup/vault/add-edit.component.ts +++ b/src/popup/vault/add-edit.component.ts @@ -75,22 +75,13 @@ export class AddEditComponent extends BaseAddEditComponent { await this.load(); if (!this.editMode || this.cloneMode) { - if (params.name && (this.cipher.name == null || this.cipher.name === '')) { - if (this.popupUtilsService.inPopout(window)) { - this.cipher.name = ''; - } - else { - this.cipher.name = params.name; - } - + if (!this.popupUtilsService.inPopout(window) && params.name && + (this.cipher.name == null || this.cipher.name === '')) { + this.cipher.name = params.name; } - if (params.uri && (this.cipher.login.uris[0].uri == null || this.cipher.login.uris[0].uri === '')) { - if (this.popupUtilsService.inPopout(window)) { - this.cipher.login.uris[0].uri = ''; - } - else { - this.cipher.login.uris[0].uri = params.uri; - } + if (!this.popupUtilsService.inPopout(window) && params.uri && + (this.cipher.login.uris[0].uri == null || this.cipher.login.uris[0].uri === '')) { + this.cipher.login.uris[0].uri = params.uri; } } if (queryParamsSub != null) {