diff --git a/.changeset/great-cooks-hunt.md b/.changeset/great-cooks-hunt.md new file mode 100644 index 000000000000..43c9b8b2344f --- /dev/null +++ b/.changeset/great-cooks-hunt.md @@ -0,0 +1,5 @@ +--- +"@sveltejs/kit": patch +--- + +fix: open a new tab for `
` and ` +
+ +
+ + diff --git a/packages/kit/test/apps/basics/test/cross-platform/client.test.js b/packages/kit/test/apps/basics/test/cross-platform/client.test.js index 6d367cf414c6..b8f485fc228d 100644 --- a/packages/kit/test/apps/basics/test/cross-platform/client.test.js +++ b/packages/kit/test/apps/basics/test/cross-platform/client.test.js @@ -769,6 +769,34 @@ test.describe('Routing', () => { expect(await page.textContent('h3')).toBe('bar'); }); + test('responds to
submission with new tab', async ({ page }) => { + await page.goto('/routing/form-target-blank'); + + let tabs = page.context().pages(); + expect(tabs.length === 1); + + const new_tab = page.waitForEvent('popup', { timeout: 1000 }); + await page.locator('button', { hasText: 'Inside form' }).click(); + await new_tab; + + tabs = page.context().pages(); + expect(tabs.length > 1); + }); + + test('responds to