fix other case

pull/13648/head
Dominic Gannaway 2 years ago
parent 17893b4e2e
commit 50db71e041

@ -75,6 +75,14 @@ export function RegularElement(node, context) {
node.attributes.push(create_attribute('value', child.start, child.end, [child]));
}
if (
node.attributes.some(
(attribute) => attribute.type === 'Attribute' && attribute.name === 'autofocus'
)
) {
mark_subtree_dynamic(context.path);
}
const binding = context.state.scope.get(node.name);
if (
binding !== null &&

@ -1,6 +1,2 @@
<h1>wat</h1>
<input autofocus />
<div>
<input autofocus />
</div>

@ -0,0 +1,7 @@
import { test } from '../../test';
export default test({
async test({ assert, target, window }) {
assert.equal(target.querySelector('input'), window.document.activeElement);
}
});
Loading…
Cancel
Save