Permalink
Browse files

hide keyboard on scroll

  • Loading branch information...
dbecher committed Mar 7, 2013
1 parent a9f5eac commit 7663aeecbf1b49523f049670974563087b8751b4
Showing with 6 additions and 1 deletion.
  1. +6 −1 js/app.js
View
@@ -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() {
@@ -97,6 +98,10 @@
return false;
},
+ hideKeyboard: function() {
+ if(document.activeElement) document.activeElement.blur();
+ },
+
cleanup: function() {
delete this.$textField, this.$button;
this._cleanup();

0 comments on commit 7663aee

Please sign in to comment.