Pārlūkot izejas kodu

Send out less active/inactive chat state messages.

Don't send out 'active' and 'inactive' chat state messages on blur and focus of chat box.
These events happen too often, causing lots of unnecessary messages.
JC Brand 10 gadi atpakaļ
vecāks
revīzija
0426f47941
1 mainītis faili ar 0 papildinājumiem un 12 dzēšanām
  1. 0 12
      converse.js

+ 0 - 12
converse.js

@@ -1191,8 +1191,6 @@
                 'click .close-chatbox-button': 'close',
                 'click .toggle-chatbox-button': 'minimize',
                 'keypress textarea.chat-textarea': 'keyPressed',
-                'focus textarea.chat-textarea': 'chatBoxFocused',
-                'blur textarea.chat-textarea': 'chatBoxBlurred',
                 'click .toggle-smiley': 'toggleEmoticonMenu',
                 'click .toggle-smiley ul li': 'insertEmoticon',
                 'click .toggle-clear': 'clearMessages',
@@ -1498,16 +1496,6 @@
                 }
             },
 
-            chatBoxFocused: function (ev) {
-                ev.preventDefault();
-                this.setChatState(ACTIVE);
-            },
-
-            chatBoxBlurred: function (ev) {
-                ev.preventDefault();
-                this.setChatState(INACTIVE);
-            },
-
             onDragResizeStart: function (ev) {
                 if (!converse.allow_dragresize) { return true; }
                 // Record element attributes for mouseMove().