diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fd3d96fbe..f311416980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Update `` to `undefined` ([#3569](https://github.com/sveltejs/svelte/issues/3569)) * Fix resize listening on certain older browsers ([#4752](https://github.com/sveltejs/svelte/issues/4752)) * Add `a11y-no-onchange` warning ([#4788](https://github.com/sveltejs/svelte/pull/4788)) diff --git a/README.md b/README.md index fa725804a9..0d9b59a4cc 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,9 @@ npm install && npm run update npm run dev ``` +### Is svelte.dev down? + +Probably not, but it's possible. If you can't seem to access any `.dev` sites, check out [this SuperUser question and answer](https://superuser.com/q/1413402). ## License diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 29a2cf75a4..153eb1b4cc 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -121,6 +121,9 @@ An element or component can have multiple spread attributes, interspersed with r ``` + +> The `value` attribute of an `input` element or its children `option` elements must not be set with spread attributes when using `bind:group` or `bind:checked`. Svelte needs to be able to see the element's `value` directly in the markup in these cases so that it can link it to the bound variable. + --- ### Text expressions diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index 56c58634b7..97eabd1146 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -521,7 +521,7 @@ $: $size = big ? 100 : 10; ### `svelte/transition` -The `svelte/transition` module exports six functions: `fade`, `fly`, `slide`, `scale`, `draw` and `crossfade`. They are for use with Svelte [`transitions`](docs#transition_fn). +The `svelte/transition` module exports seven functions: `fade`, `blur`, `fly`, `slide`, `scale`, `draw` and `crossfade`. They are for use with Svelte [`transitions`](docs#transition_fn). #### `fade` diff --git a/site/content/faq/300-is-svelte-dev-down.md b/site/content/faq/300-is-svelte-dev-down.md deleted file mode 100644 index a7ce9984b7..0000000000 --- a/site/content/faq/300-is-svelte-dev-down.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -question: Is svelte.dev down? ---- - -Probably not, but it's possible. If you can't seem to access any `.dev` sites, check out [this SuperUser question and answer](https://superuser.com/q/1413402). \ No newline at end of file diff --git a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts index ac5732eae7..6222eb04a4 100644 --- a/src/compiler/compile/render_dom/wrappers/Element/Binding.ts +++ b/src/compiler/compile/render_dom/wrappers/Element/Binding.ts @@ -87,7 +87,7 @@ export default class BindingWrapper { const update_conditions: any[] = this.needs_lock ? [x`!${lock}`] : []; const mount_conditions: any[] = []; - const dependency_array = [...this.node.expression.dependencies]; + const dependency_array = Array.from(this.get_dependencies()); if (dependency_array.length > 0) { update_conditions.push(block.renderer.dirty(dependency_array)); diff --git a/test/runtime/samples/binding-select-late-2/_config.js b/test/runtime/samples/binding-select-late-2/_config.js new file mode 100644 index 0000000000..42c45d1366 --- /dev/null +++ b/test/runtime/samples/binding-select-late-2/_config.js @@ -0,0 +1,34 @@ +export default { + props: { + items: [], + selected: 'two' + }, + + html: ` + +

selected: two

+ `, + + ssrHtml: ` + +

selected: two

+ `, + + test({ assert, component, target }) { + component.items = [ 'one', 'two', 'three' ]; + + const options = target.querySelectorAll('option'); + assert.ok(!options[0].selected); + assert.ok(options[1].selected); + assert.ok(!options[2].selected); + + assert.htmlEqual(target.innerHTML, ` + +

selected: two

+ `); + } +}; diff --git a/test/runtime/samples/binding-select-late-2/main.svelte b/test/runtime/samples/binding-select-late-2/main.svelte new file mode 100644 index 0000000000..52cc14528a --- /dev/null +++ b/test/runtime/samples/binding-select-late-2/main.svelte @@ -0,0 +1,12 @@ + + + + +

selected: {selected || 'nothing'}

\ No newline at end of file