diff --git a/react/src/components/Todo.js b/react/src/components/Todo.js index 78ebb38..bb013ee 100644 --- a/react/src/components/Todo.js +++ b/react/src/components/Todo.js @@ -80,7 +80,10 @@ class Todo extends React.Component { color: this.props.todo.completed ? '#888888' : 'black', }} className="todo" - onClick={this.props.toggleTodo} + onClick={() => { + this.onMouseOut(); + this.props.toggleTodo(); + }} > {this.props.todo.text}