mirror of https://github.com/sveltejs/svelte
fix: never consider inert boundary effects (#14999)
* fix: never consider inert boundary effects * chore: inline bitwisepull/14970/head
parent
36ef59df1f
commit
8a1acac084
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: never consider inert boundary effects
|
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
throw new Error();
|
||||
</script>
|
@ -0,0 +1,17 @@
|
||||
import { flushSync } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: '<button></button><div>0</div>',
|
||||
mode: ['client'],
|
||||
test({ assert, target }) {
|
||||
let btn = target.querySelector('button');
|
||||
let div = target.querySelector('div');
|
||||
|
||||
flushSync(() => {
|
||||
btn?.click();
|
||||
});
|
||||
|
||||
assert.equal(div?.innerHTML, `1`);
|
||||
}
|
||||
});
|
@ -0,0 +1,14 @@
|
||||
<script>
|
||||
import Child from "./Child.svelte"
|
||||
|
||||
let count = $state(0);
|
||||
</script>
|
||||
|
||||
<button onclick={()=>count++}></button>
|
||||
<svelte:boundary>
|
||||
<Child />
|
||||
|
||||
{#snippet failed()}
|
||||
<div>{count}</div>
|
||||
{/snippet}
|
||||
</svelte:boundary>
|
Loading…
Reference in new issue