mirror of https://github.com/sveltejs/svelte
parent
bb245445fc
commit
3b0215239c
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: correctly applies autofocus to static elements
|
||||
@ -0,0 +1,10 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, target, window }) {
|
||||
assert.equal(
|
||||
target.querySelector('input'),
|
||||
window.document.activeElement
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,6 @@
|
||||
<h1>wat</h1>
|
||||
<input autofocus />
|
||||
|
||||
<div>
|
||||
<input autofocus />
|
||||
</div>
|
||||
Loading…
Reference in new issue