site: fix enter handling in animate example

pull/2772/head
Conduitry 5 years ago
parent 66e39d52d4
commit 3cfbd66841

@ -44,12 +44,6 @@
function remove(todo) {
todos = todos.filter(t => t !== todo);
}
function handleKeydown(event) {
if (event.which === 13) {
addTodo(event.target);
}
}
</script>
<style>
@ -115,7 +109,7 @@
</style>
<div class='board'>
<input class="new-todo" placeholder="what needs to be done?" on:enter={add}>
<input class="new-todo" placeholder="what needs to be done?" on:keydown="{event => event.which === 13 && add(this)}">
<div class='left'>
<h2>todo</h2>

Loading…
Cancel
Save