mirror of https://github.com/sveltejs/svelte
parent
f2f71ae3a1
commit
34079a0ec5
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: restore value after attribute removal during hydration
|
@ -0,0 +1,10 @@
|
||||
import { test } from '../../assert';
|
||||
|
||||
export default test({
|
||||
html: `<input type="checkbox" name="lang" value="keep" />`,
|
||||
ssrHtml: `<input type="checkbox" name="lang" value="keep" checked />`,
|
||||
test({ window, assert, target, mod }) {
|
||||
const input = target.querySelector('input');
|
||||
assert.equal(input?.checked, true);
|
||||
}
|
||||
});
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let to_check = $state("keep")
|
||||
</script>
|
||||
|
||||
<input type="checkbox" name="lang" value="keep" checked={to_check === "keep"} />
|
Loading…
Reference in new issue