Skip to content

Commit

Permalink
fix yui .focus() spec deviation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus authored and sindresorhus committed Aug 6, 2013
1 parent 3df87c7 commit 9f55c02
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion architecture-examples/yui/js/views/todoview.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ YUI.add('todo-view', function (Y) {

// Turn on editing mode for the Todo by exposing the input field.
edit: function () {
var input = this.get('inputNode');

this.get('container').addClass('editing');
this.get('inputNode').focus();
// place cursor at the end of the line
input._node.value = input._node.value;
input.focus();
},

// Get the value from our input field while hiding it, and
Expand Down

0 comments on commit 9f55c02

Please sign in to comment.