FB11958284 - target="_blank" and command-click don't work in extension pages
Safari 16.2 (17614.3.7.1.7, 17614) on macOS 12.6.2 (21G320)
target="_blank" and command-click don't work in extension pages. They open links in the same tab rather than in a new tab. The attached sample project uses an extension preference page, but this happens in any extension page, such as one opened by runtime.getURL() and tabs.create().
Steps to reproduce:
- Unzip, open, build, and run the attached sample Xcode project TargetBlankBug
- Enable the extension in Safari Extensions Preferences
- Click the Preferences button in Safari Extensions Preferences to open the extension preferences in a tab
- Click on the target="_blank" link, or command-click on it
Expected results: The link opens in a new tab.
Actual results: The link opens in the same tab.
TargetBlankBug.zip Strangely, this bug only occurs on Mac. target="_blank" works correctly in Mobile Safari.
@lapcat Just tried this on macOS with Safari Version 18.3.1 and could not reproduce the issue.
@lapcat Just tried this on macOS with Safari Version 18.3.1 and could not reproduce the issue.
I can still reproduce it.
The Apple Feedback is still open too.
See attachment for my reproduction. In general I would not trust the open state of a Feedback report)
https://github.com/user-attachments/assets/c07f72b2-b6c9-4dfb-a603-6600f8b42902
Those aren't the steps to reproduce. Use the Settings (formerly Preferences) button in the Safari Extensions Settings pane.
@lapcat Thanks for clarifying! Can reproduce the issue now.
Opened an issue for this bug https://bugs.webkit.org/show_bug.cgi?id=290532