Skip to content

Commit

Permalink
Merge pull request #110 from misstick/feature-handle-copypaste
Browse files Browse the repository at this point in the history
When pasting text from the clipboard the input is not resized properly
  • Loading branch information
samuelclay committed Feb 9, 2014
2 parents 1a42c1d + a3f2bdd commit ae03f4f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/js/views/search_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ VS.ui.SearchInput = Backbone.View.extend({
events : {
'keypress input' : 'keypress',
'keydown input' : 'keydown',
'keyup input' : 'keyup',
'click input' : 'maybeTripleClick',
'dblclick input' : 'startTripleClickTimer'
},
Expand Down Expand Up @@ -403,6 +404,11 @@ VS.ui.SearchInput = Backbone.View.extend({
view.setCursorAtEnd(-1);
}

},

// We should get the value of an input should be done
// on keyup since keydown gets the previous value and not the current one
keyup : function(e) {
this.box.trigger('resize.autogrow', e);
}

Expand Down

0 comments on commit ae03f4f

Please sign in to comment.