[PM-7353] Autofill item selection not working from within current tab view in vault (#8670)
* [PM-7353] Fix autofill not working from current tab component * [PM-7353] Fix autofill not working from current tab component * [PM-7353] Fix autofill not working from current tab component
This commit is contained in:
parent
4607ae73c0
commit
e4720de62a
|
@ -56,6 +56,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||
private totpTimeout: number;
|
||||
private loadedTimeout: number;
|
||||
private searchTimeout: number;
|
||||
private initPageDetailsTimeout: number;
|
||||
|
||||
protected unassignedItemsBannerEnabled$ = this.configService.getFeatureFlag$(
|
||||
FeatureFlag.UnassignedItemsBanner,
|
||||
|
@ -316,18 +317,13 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||
});
|
||||
|
||||
if (this.loginCiphers.length) {
|
||||
void BrowserApi.tabSendMessage(this.tab, {
|
||||
command: "collectPageDetails",
|
||||
tab: this.tab,
|
||||
sender: BroadcasterSubscriptionId,
|
||||
});
|
||||
|
||||
this.loginCiphers = this.loginCiphers.sort((a, b) =>
|
||||
this.cipherService.sortCiphersByLastUsedThenName(a, b),
|
||||
);
|
||||
}
|
||||
|
||||
this.isLoading = this.loaded = true;
|
||||
this.collectTabPageDetails();
|
||||
}
|
||||
|
||||
async goToSettings() {
|
||||
|
@ -365,4 +361,19 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||
this.autofillCalloutText = this.i18nService.t("autofillSelectInfoWithoutCommand");
|
||||
}
|
||||
}
|
||||
|
||||
private collectTabPageDetails() {
|
||||
void BrowserApi.tabSendMessage(this.tab, {
|
||||
command: "collectPageDetails",
|
||||
tab: this.tab,
|
||||
sender: BroadcasterSubscriptionId,
|
||||
});
|
||||
|
||||
window.clearTimeout(this.initPageDetailsTimeout);
|
||||
this.initPageDetailsTimeout = window.setTimeout(() => {
|
||||
if (this.pageDetails.length === 0) {
|
||||
this.collectTabPageDetails();
|
||||
}
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue