Skip to content

Commit

Permalink
Fix laggy keyup events in Vue example (#2085)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzhovnirchyk authored Oct 8, 2020
1 parent d07963e commit 8acdd5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/vue/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<section class="todoapp" v-cloak>
<header class="header">
<h1>todos</h1>
<input class="new-todo" autofocus autocomplete="off" placeholder="What needs to be done?" v-model="newTodo" @keyup.enter="addTodo">
<input class="new-todo" autofocus autocomplete="off" placeholder="What needs to be done?" v-model="newTodo" @keydown.enter="addTodo">
</header>
<section class="main" v-show="todos.length">
<input id="toggle-all" class="toggle-all" type="checkbox" v-model="allDone">
Expand All @@ -23,7 +23,7 @@ <h1>todos</h1>
<label @dblclick="editTodo(todo)">{{todo.title}}</label>
<button class="destroy" @click="removeTodo(todo)"></button>
</div>
<input class="edit" type="text" v-model="todo.title" v-todo-focus="todo == editedTodo" @blur="doneEdit(todo)" @keyup.enter="doneEdit(todo)" @keyup.esc="cancelEdit(todo)">
<input class="edit" type="text" v-model="todo.title" v-todo-focus="todo == editedTodo" @blur="doneEdit(todo)" @keydown.enter="doneEdit(todo)" @keydown.esc="cancelEdit(todo)">
</li>
</ul>
</section>
Expand Down

0 comments on commit 8acdd5c

Please sign in to comment.