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.
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:
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.