Closed
Description
Describe the bug
The onfocus
handler is not called when the focus
action focuses the input.
<script lang="ts">
let attributes = {};
const focus = (input) => {
input.focus();
};
</script>
<input
{...attributes}
onfocus={() => console.log("onfocus", "1")}
use:focus
/>
If you remove the object spread, it mysteriously starts working again.
<script lang="ts">
const focus = (input) => {
input.focus();
};
</script>
<input
onfocus={() => console.log("onfocus", "1")}
use:focus
/>
Reproduction
Logs
No response
System Info
Not needed
Severity
annoyance