Skip to content

Commit

Permalink
use event.target.value
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Nov 11, 2024
1 parent 324c7eb commit 28b8e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/stdlib/generators/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function input(element) {
return observe((change) => {
const event = eventof(element);
let value = valueof(element);
const inputted = () => change(valueof(element));
const inputted = (event) => change(valueof(event.target));
element.addEventListener(event, inputted);
if (value !== undefined) change(value);
return () => element.removeEventListener(event, inputted);
Expand Down

0 comments on commit 28b8e96

Please sign in to comment.