浏览代码

autoFocus for richtexteditor

pu 4 年前
父节点
当前提交
12f8bdc0db
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      src/RichTextEditor.js

+ 3
- 0
src/RichTextEditor.js 查看文件

@@ -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