From 177d5e54d654b3c03175f79d7586e659b3fde710 Mon Sep 17 00:00:00 2001 From: mx1700 Date: Mon, 5 Aug 2019 22:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=86=99=E6=97=A5=E8=AE=B0?= =?UTF-8?q?=E9=A1=B5=E9=94=AE=E7=9B=98=E5=BC=B9=E5=87=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/WritePage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/page/WritePage.js b/src/page/WritePage.js index 53c6f83..fec0a59 100644 --- a/src/page/WritePage.js +++ b/src/page/WritePage.js @@ -114,10 +114,9 @@ export default class WritePage extends Component { componentDidMount() { this.loadNotebook().then(notebookCount => { if(notebookCount > 0) { - setTimeout(() => { + InteractionManager.runAfterInteractions(() => { this.contentInput.focus(); - }, 500); - + }); } else { Alert.alert('提示', '没有可用日记本,无法写日记',[ {text: '取消', onPress: () => {}},