瀏覽代碼

ref(chat): clean up public blur/focus methods on input

Method blur is not called. Method blur is called
internally only.
master
Leonard Kim 6 年之前
父節點
當前提交
d8df7fde84
共有 1 個文件被更改,包括 5 次插入13 次删除
  1. 5
    13
      react/features/chat/components/web/ChatInput.js

+ 5
- 13
react/features/chat/components/web/ChatInput.js 查看文件

90
          * HTML Textareas do not support autofocus. Simulate autofocus by
90
          * HTML Textareas do not support autofocus. Simulate autofocus by
91
          * manually focusing.
91
          * manually focusing.
92
          */
92
          */
93
-        this.focus();
93
+        this._focus();
94
     }
94
     }
95
 
95
 
96
     /**
96
     /**
131
         );
131
         );
132
     }
132
     }
133
 
133
 
134
-    /**
135
-     * Removes cursor focus on this component's text area.
136
-     *
137
-     * @returns {void}
138
-     */
139
-    blur() {
140
-        this._textArea && this._textArea.blur();
141
-    }
142
-
143
     /**
134
     /**
144
      * Place cursor focus on this component's text area.
135
      * Place cursor focus on this component's text area.
145
      *
136
      *
137
+     * @private
146
      * @returns {void}
138
      * @returns {void}
147
      */
139
      */
148
-    focus() {
140
+    _focus() {
149
         this._textArea && this._textArea.focus();
141
         this._textArea && this._textArea.focus();
150
     }
142
     }
151
 
143
 
203
             showSmileysPanel: false
195
             showSmileysPanel: false
204
         });
196
         });
205
 
197
 
206
-        this.focus();
198
+        this._focus();
207
     }
199
     }
208
 
200
 
209
     _onToggleSmileysPanel: () => void;
201
     _onToggleSmileysPanel: () => void;
217
     _onToggleSmileysPanel() {
209
     _onToggleSmileysPanel() {
218
         this.setState({ showSmileysPanel: !this.state.showSmileysPanel });
210
         this.setState({ showSmileysPanel: !this.state.showSmileysPanel });
219
 
211
 
220
-        this.focus();
212
+        this._focus();
221
     }
213
     }
222
 
214
 
223
     _setTextAreaRef: (?HTMLTextAreaElement) => void;
215
     _setTextAreaRef: (?HTMLTextAreaElement) => void;

Loading…
取消
儲存