mirror of https://github.com/sveltejs/svelte
fix: correctly applies autofocus to static elements (#13648)
* fix: correctly applies autofocus to static elements * lint * fix other casepull/13640/head
parent
e21e624fff
commit
193cc37f7a
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: correctly applies autofocus to static elements
|
@ -0,0 +1,7 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, target, window }) {
|
||||
assert.equal(target.querySelector('input'), window.document.activeElement);
|
||||
}
|
||||
});
|
@ -0,0 +1,2 @@
|
||||
<h1>wat</h1>
|
||||
<input autofocus />
|
@ -0,0 +1,7 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, target, window }) {
|
||||
assert.equal(target.querySelector('input'), window.document.activeElement);
|
||||
}
|
||||
});
|
@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<input autofocus />
|
||||
</div>
|
Loading…
Reference in new issue