-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#8206: Handle target=_blank
links in MS Edge sidePanel sub-frames
#8223
Conversation
if (isMicrosoftEdge() && isMV3()) { | ||
openAllLinksInPopups({ | ||
// If they don't have target="_blank", the user wants the navigation to happen in the same tab | ||
onlyTargetBlank: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: this doesn't cover frames that use a base
tag to have a default target
. If necessary, it can be done in a followup PR (easy fix in openAllLinksInPopups
:
link.target === "_blank" || document.querySelector('base[target="_blank"]')
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8223 +/- ##
==========================================
- Coverage 73.47% 73.43% -0.05%
==========================================
Files 1334 1351 +17
Lines 41259 41373 +114
Branches 7686 7715 +29
==========================================
+ Hits 30316 30383 +67
- Misses 10943 10990 +47 ☔ View full report in Codecov by Sentry. |
Things to double-check:
|
|
Looks good to me, but I'd recommend manually verifying this change before merging. (PR notes these changes are untested) |
@grahamlangford @fungairino you'll need to coordinate on testing |
target=_blank
links in sidePanel sub-framestarget=_blank
links in MS Edge sidePanel sub-frames
Playwright test results - MV2Details
Flaky testschromeSetup › auth.setup.ts › authenticate Skipped testschrome › tests/extensionConsoleActivation.spec.ts › can activate a mod with built-in integration |
Playwright test results - MV3Details
|
What does this PR do?
Discussion
#7889 added a
click
listener to the links in Edge in order to intercept and manually open a new popup.Iframes are not covered by this listener, so each iframe needs its own listener.
In this PR I used the content script to add the listener, because presumably these frames natively receive the content script.
Demo
Untested
Checklist