Browse Source

autoFocus for richtexteditor

pu 4 years ago
parent
commit
12f8bdc0db
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/RichTextEditor.js

+ 3
- 0
src/RichTextEditor.js View File

@@ -56,6 +56,9 @@ export default class RichTextEditor extends Component {
56 56
         Keyboard.addListener('keyboardDidShow', this._onKeyboardWillShow),
57 57
         Keyboard.addListener('keyboardDidHide', this._onKeyboardWillHide)
58 58
       ];
59
+      if (this.props.autoFocus) {
60
+        this.webview.requestFocus();
61
+      }
59 62
     }
60 63
   }
61 64