mirror of https://github.com/sveltejs/svelte
parent
8067841170
commit
18699ba2ee
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: reset attribute cache after setting corresponding property
|
@ -0,0 +1,19 @@
|
||||
import { flushSync } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
test({ target, assert }) {
|
||||
const input = target.querySelector('input');
|
||||
const button = target.querySelector('button');
|
||||
|
||||
assert.equal(input?.step, 'any');
|
||||
|
||||
button?.click();
|
||||
flushSync();
|
||||
assert.equal(input?.step, '10');
|
||||
|
||||
button?.click();
|
||||
flushSync();
|
||||
assert.equal(input?.step, 'any');
|
||||
}
|
||||
});
|
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
let step = "any";
|
||||
</script>
|
||||
|
||||
<input type="range" {...{step}} />
|
||||
<button onclick={() => step = step === "any" ? 10 : "any"}>change step</button>
|
Loading…
Reference in new issue