Parcourir la source

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

Danilo Bargen il y a 6 ans
Parent
commit
be828b07a7
1 fichiers modifiés avec 2 ajouts et 3 suppressions
  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();