Skip to content

Commit

Permalink
hide keyboard on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
David Becher committed Mar 7, 2013
1 parent a9f5eac commit 7663aee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
events: {
"keyup #new-message-text": 'toggleSendButton',
"submit #new-message-form": 'send',
"click .chat-message": 'goToMessage'
"click .chat-message": 'goToMessage',
"scroll #chat-messages": 'hideKeyboard'
},

initialize: function() {
Expand Down Expand Up @@ -97,6 +98,10 @@
return false;
},

hideKeyboard: function() {
if(document.activeElement) document.activeElement.blur();
},

cleanup: function() {
delete this.$textField, this.$button;
this._cleanup();
Expand Down

0 comments on commit 7663aee

Please sign in to comment.