mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[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:
@@ -56,6 +56,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
private totpTimeout: number;
|
private totpTimeout: number;
|
||||||
private loadedTimeout: number;
|
private loadedTimeout: number;
|
||||||
private searchTimeout: number;
|
private searchTimeout: number;
|
||||||
|
private initPageDetailsTimeout: number;
|
||||||
|
|
||||||
protected unassignedItemsBannerEnabled$ = this.configService.getFeatureFlag$(
|
protected unassignedItemsBannerEnabled$ = this.configService.getFeatureFlag$(
|
||||||
FeatureFlag.UnassignedItemsBanner,
|
FeatureFlag.UnassignedItemsBanner,
|
||||||
@@ -316,18 +317,13 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (this.loginCiphers.length) {
|
if (this.loginCiphers.length) {
|
||||||
void BrowserApi.tabSendMessage(this.tab, {
|
|
||||||
command: "collectPageDetails",
|
|
||||||
tab: this.tab,
|
|
||||||
sender: BroadcasterSubscriptionId,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.loginCiphers = this.loginCiphers.sort((a, b) =>
|
this.loginCiphers = this.loginCiphers.sort((a, b) =>
|
||||||
this.cipherService.sortCiphersByLastUsedThenName(a, b),
|
this.cipherService.sortCiphersByLastUsedThenName(a, b),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isLoading = this.loaded = true;
|
this.isLoading = this.loaded = true;
|
||||||
|
this.collectTabPageDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
async goToSettings() {
|
async goToSettings() {
|
||||||
@@ -365,4 +361,19 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
|||||||
this.autofillCalloutText = this.i18nService.t("autofillSelectInfoWithoutCommand");
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user