{"action":"created","issue":{"url":"https://api.github.com/repos/NervJS/taro/issues/2152","repository_url":"https://api.github.com/repos/NervJS/taro","labels_url":"https://api.github.com/repos/NervJS/taro/issues/2152/labels{/name}","comments_url":"https://api.github.com/repos/NervJS/taro/issues/2152/comments","events_url":"https://api.github.com/repos/NervJS/taro/issues/2152/events","html_url":"https://github.com/NervJS/taro/issues/2152","id":409660343,"node_id":"MDU6SXNzdWU0MDk2NjAzNDM=","number":2152,"title":"Textarea在开启小键盘的时候，setState会执行不成功","user":{"login":"wuyulong1990","id":31003288,"node_id":"MDQ6VXNlcjMxMDAzMjg4","avatar_url":"https://avatars2.githubusercontent.com/u/31003288?v=4","gravatar_id":"","url":"https://api.github.com/users/wuyulong1990","html_url":"https://github.com/wuyulong1990","followers_url":"https://api.github.com/users/wuyulong1990/followers","following_url":"https://api.github.com/users/wuyulong1990/following{/other_user}","gists_url":"https://api.github.com/users/wuyulong1990/gists{/gist_id}","starred_url":"https://api.github.com/users/wuyulong1990/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuyulong1990/subscriptions","organizations_url":"https://api.github.com/users/wuyulong1990/orgs","repos_url":"https://api.github.com/users/wuyulong1990/repos","events_url":"https://api.github.com/users/wuyulong1990/events{/privacy}","received_events_url":"https://api.github.com/users/wuyulong1990/received_events","type":"User","site_admin":false},"labels":[{"id":1119227923,"node_id":"MDU6TGFiZWwxMTE5MjI3OTIz","url":"https://api.github.com/repos/NervJS/taro/labels/to%20be%20closed","name":"to be closed","color":"ededed","default":false},{"id":1117491046,"node_id":"MDU6TGFiZWwxMTE3NDkxMDQ2","url":"https://api.github.com/repos/NervJS/taro/labels/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F","name":"微信小程序","color":"4562a8","default":false},{"id":1185565293,"node_id":"MDU6TGFiZWwxMTg1NTY1Mjkz","url":"https://api.github.com/repos/NervJS/taro/labels/%E9%9C%80%E8%A6%81%E5%A4%8D%E7%8E%B0","name":"需要复现","color":"DA39DE","default":false}],"state":"open","locked":false,"assignee":{"login":"Chen-jj","id":11807297,"node_id":"MDQ6VXNlcjExODA3Mjk3","avatar_url":"https://avatars3.githubusercontent.com/u/11807297?v=4","gravatar_id":"","url":"https://api.github.com/users/Chen-jj","html_url":"https://github.com/Chen-jj","followers_url":"https://api.github.com/users/Chen-jj/followers","following_url":"https://api.github.com/users/Chen-jj/following{/other_user}","gists_url":"https://api.github.com/users/Chen-jj/gists{/gist_id}","starred_url":"https://api.github.com/users/Chen-jj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chen-jj/subscriptions","organizations_url":"https://api.github.com/users/Chen-jj/orgs","repos_url":"https://api.github.com/users/Chen-jj/repos","events_url":"https://api.github.com/users/Chen-jj/events{/privacy}","received_events_url":"https://api.github.com/users/Chen-jj/received_events","type":"User","site_admin":false},"assignees":[{"login":"Chen-jj","id":11807297,"node_id":"MDQ6VXNlcjExODA3Mjk3","avatar_url":"https://avatars3.githubusercontent.com/u/11807297?v=4","gravatar_id":"","url":"https://api.github.com/users/Chen-jj","html_url":"https://github.com/Chen-jj","followers_url":"https://api.github.com/users/Chen-jj/followers","following_url":"https://api.github.com/users/Chen-jj/following{/other_user}","gists_url":"https://api.github.com/users/Chen-jj/gists{/gist_id}","starred_url":"https://api.github.com/users/Chen-jj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chen-jj/subscriptions","organizations_url":"https://api.github.com/users/Chen-jj/orgs","repos_url":"https://api.github.com/users/Chen-jj/repos","events_url":"https://api.github.com/users/Chen-jj/events{/privacy}","received_events_url":"https://api.github.com/users/Chen-jj/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2019-02-13T07:16:21Z","updated_at":"2019-02-21T12:34:11Z","closed_at":null,"author_association":"NONE","body":"```js\r\nJS：\r\nonInput = e => {\r\n    this.setState({ value: e.target.value });\r\n};\r\n\r\nsend = () => {\r\n    const { value } = this.state;\r\n\r\n    // 这个setState会执行不成功\r\n    this.setState({ value: '' });\r\n\r\n    /** 这里是我的解决方法，需要延时100毫秒等待小键盘消失后再执行setState\r\n    setTimeout(() => {\r\n      this.setState({ value: '' });\r\n    }, 100);\r\n    */\r\n};\r\n\r\nHTML：\r\n<Textarea\r\n   maxlength={-1}\r\n   showConfirmBar={false}\r\n   cursorSpacing={10}\r\n   value={this.state.value}\r\n   onInput={this.onInput}\r\n   className=\"input\"\r\n/>\r\n<Button type=\"primary\" className=\"send-btn\" onClick={this.send}>\r\n   <View>发送</View>\r\n</Button>\r\n```\r\n我的版本：\r\n    \"@tarojs/async-await\": \"^1.0.7\",\r\n    \"@tarojs/components\": \"^1.0.7\",\r\n    \"@tarojs/redux\": \"^1.0.7\",\r\n    \"@tarojs/redux-h5\": \"^1.0.7\",\r\n    \"@tarojs/router\": \"^1.0.7\",\r\n    \"@tarojs/taro\": \"^1.0.7\",\r\n    \"@tarojs/taro-h5\": \"^1.0.7\",\r\n    \"@tarojs/taro-weapp\": \"^1.0.7\",\r\n    \"@tarojs/cli\": \"^1.0.7\",\r\n    \"@tarojs/plugin-babel\": \"^1.0.7\",\r\n    \"@tarojs/plugin-csso\": \"^1.0.7\",\r\n    \"@tarojs/plugin-sass\": \"^1.0.7\",\r\n    \"@tarojs/plugin-uglifyjs\": \"^1.0.7\",\r\n    \"@tarojs/webpack-runner\": \"^1.0.7\"\r\n\r\n平台：微信小程序\r\ntaro版本：Taro v1.0.0-beta.14\r\n\r\n发现的结论：\r\n在有小键盘的时候this.setState({ value: '' });会执行不成功。\r\n"},"comment":{"url":"https://api.github.com/repos/NervJS/taro/issues/comments/465983620","html_url":"https://github.com/NervJS/taro/issues/2152#issuecomment-465983620","issue_url":"https://api.github.com/repos/NervJS/taro/issues/2152","id":465983620,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NTk4MzYyMA==","user":{"login":"taro-bot[bot]","id":44693195,"node_id":"MDM6Qm90NDQ2OTMxOTU=","avatar_url":"https://avatars3.githubusercontent.com/in/20114?v=4","gravatar_id":"","url":"https://api.github.com/users/taro-bot%5Bbot%5D","html_url":"https://github.com/apps/taro-bot","followers_url":"https://api.github.com/users/taro-bot%5Bbot%5D/followers","following_url":"https://api.github.com/users/taro-bot%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/taro-bot%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/taro-bot%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taro-bot%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/taro-bot%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/taro-bot%5Bbot%5D/repos","events_url":"https://api.github.com/users/taro-bot%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/taro-bot%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2019-02-21T12:34:11Z","updated_at":"2019-02-21T12:34:11Z","author_association":"NONE","body":"Hello~\n\n您的问题我们无法复现。如果有空的话还请拔冗提供一个简单的复现 demo，否则这个 issue 将在 15 天后被自动关闭。\n\n如果您在这 15 天中更新更多信息自动关闭的流程会自动取消，如有其他问题也可以发起新的 Issue。\n\nGood luck and happy coding~"}}
{"actor":{"display_login":"taro-bot"}}