mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-09 00:11:30 +01:00
[PM-5189] Adjusting how we identify iframes to be more exact in approach
This commit is contained in:
parent
013275ebcb
commit
6c2b93ec8d
@ -245,10 +245,10 @@ class AutofillInit implements AutofillInitInterface {
|
||||
): Promise<SubFrameOffsetData | null> {
|
||||
const { subFrameUrl } = message;
|
||||
const subFrameUrlWithoutTrailingSlash = subFrameUrl?.replace(/\/$/, "");
|
||||
|
||||
const iframeElement = document.querySelector(
|
||||
`iframe[src^="${subFrameUrlWithoutTrailingSlash}"]`,
|
||||
`iframe[src="${subFrameUrl}"], iframe[src="${subFrameUrlWithoutTrailingSlash}"]`,
|
||||
);
|
||||
|
||||
if (!iframeElement) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user