Skip to content

Commit

Permalink
fix jquery .focus() spec deviation.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Jul 26, 2013
1 parent 24c22e2 commit b299ed3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion architecture-examples/jquery/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ jQuery(function ($) {
App.render();
},
edit: function () {
$(this).closest('li').addClass('editing').find('.edit').focus();
var $input = $(this).closest('li').addClass('editing').find('.edit');
var val = $input.val();

$input.val(val).focus();
},
blurOnEnter: function (e) {
if (e.which === App.ENTER_KEY) {
Expand Down

0 comments on commit b299ed3

Please sign in to comment.