Explorar o código

ComposeArea: Use new clear() and focus() methods

Danilo Bargen %!s(int64=6) %!d(string=hai) anos
pai
achega
be828b07a7
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/directives/compose_area.ts

+ 2 - 3
src/directives/compose_area.ts

@@ -257,9 +257,8 @@ export default [
                     if (!composeAreaIsEmpty()) {
                         submitText().then(() => {
                             // Clear compose div
-                            // TODO: Use clear() and focus() methods
-                            composeDiv[0].innerText = '';
-                            composeDiv[0].focus();
+                            composeArea.clear();
+                            composeArea.focus();
 
                             // Send stopTyping event
                             stopTyping();