mirror of https://github.com/sveltejs/svelte
parent
c2daa66b3c
commit
b743e54c24
@ -0,0 +1,9 @@
|
|||||||
|
import * as assert from 'assert';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
html: '<!--#if visible-->',
|
||||||
|
test ( component, target, window ) {
|
||||||
|
component.set({ visible: true });
|
||||||
|
assert.equal( component.refs.input, window.document.activeElement );
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,3 @@
|
|||||||
|
{{#if visible}}
|
||||||
|
<input ref:input autofocus>
|
||||||
|
{{/if}}
|
Loading…
Reference in new issue