mirror of https://github.com/sveltejs/svelte
fix: account for mounting when `select_option` in `attribute_effect` (#16309)
parent
c3348aea06
commit
834cd91b36
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: account for mounting when `select_option` in `attribute_effect`
|
@ -0,0 +1,9 @@
|
|||||||
|
import { ok, test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
async test({ assert, target, instance }) {
|
||||||
|
const select = target.querySelector('select');
|
||||||
|
ok(select);
|
||||||
|
assert.equal(select.selectedIndex, 1);
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,8 @@
|
|||||||
|
<script>
|
||||||
|
let others = {onclick: ()=> {}}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<select {...others}>
|
||||||
|
<option>o1</option>
|
||||||
|
<option selected>o2</option>
|
||||||
|
</select>
|
Loading…
Reference in new issue