{"action":"created","issue":{"url":"https://api.github.com/repos/reflux/refluxjs/issues/410","labels_url":"https://api.github.com/repos/reflux/refluxjs/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/reflux/refluxjs/issues/410/comments","events_url":"https://api.github.com/repos/reflux/refluxjs/issues/410/events","html_url":"https://github.com/reflux/refluxjs/issues/410","id":105746189,"number":410,"title":"Cannot enter Chinese on textbox by React + Reflux actions","user":{"login":"compulim","id":1622400,"avatar_url":"https://avatars.githubusercontent.com/u/1622400?v=3","gravatar_id":"","url":"https://api.github.com/users/compulim","html_url":"https://github.com/compulim","followers_url":"https://api.github.com/users/compulim/followers","following_url":"https://api.github.com/users/compulim/following{/other_user}","gists_url":"https://api.github.com/users/compulim/gists{/gist_id}","starred_url":"https://api.github.com/users/compulim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compulim/subscriptions","organizations_url":"https://api.github.com/users/compulim/orgs","repos_url":"https://api.github.com/users/compulim/repos","events_url":"https://api.github.com/users/compulim/events{/privacy}","received_events_url":"https://api.github.com/users/compulim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-10T07:24:10Z","updated_at":"2015-09-14T06:51:45Z","closed_at":null,"body":"![a](https://cloud.githubusercontent.com/assets/1622400/9782384/33158b00-57cf-11e5-9acf-ea3066afb37d.gif)\r\n\r\nTested on Chrome/Edge on Windows 10, Chrome on Mac, and Mobile Safari on iOS. It fail on all of them.\r\n\r\nOn iOS, it also fail with handwriting-based IME.\r\n\r\nThis is probably because Reflux action trigger is async (`setTimeout`/`nextTick`).\r\n\r\nCode used to setup the page:\r\n``` js\r\n'use strict';\r\n\r\nvar Actions = Reflux.createActions(['setText']),\r\n    store = Reflux.createStore({\r\n        listenables: [Actions],\r\n        init: function () {\r\n            this._text = '';\r\n        },\r\n        getText: function () {\r\n            return this._text;\r\n        },\r\n        onSetText: function (newText) {\r\n            this._text = newText;\r\n            this.trigger('text');\r\n        }\r\n    }),\r\n    Page = React.createClass({\r\n        mixins: [Reflux.listenTo(store, 'onStoreChange')],\r\n        onStoreChange: function () {\r\n            this.setState({ refluxText: store.getText() });\r\n        },\r\n        getInitialState: function () {\r\n            return {\r\n                htmlText: '',\r\n                refluxText: store.getText()\r\n            };\r\n        },\r\n        onHTMLChange: function (evt) {\r\n            this.setState({ htmlText: evt.target.value });\r\n        },\r\n        onRefluxChange: function (evt) {\r\n            Actions.setText(evt.target.value);\r\n        },\r\n        render: function () {\r\n            var {state} = this;\r\n\r\n            return (\r\n                <div>\r\n                    <div>Textbox by setState only</div>\r\n                    <input type=\"text\"\r\n                           onChange={this.onHTMLChange}\r\n                           value={state.htmlText} />\r\n                    <div>Textbox by setState via Reflux action</div>\r\n                    <input type=\"text\"\r\n                           onChange={this.onRefluxChange}\r\n                           value={state.refluxText} />\r\n                    <div>this.state</div>\r\n                    <pre>{JSON.stringify(state)}</pre>\r\n                </div>\r\n            );\r\n        }\r\n    });\r\n\r\nReact.render(<Page />, document.getElementById('page'));\r\n```"},"comment":{"url":"https://api.github.com/repos/reflux/refluxjs/issues/comments/139978456","html_url":"https://github.com/reflux/refluxjs/issues/410#issuecomment-139978456","issue_url":"https://api.github.com/repos/reflux/refluxjs/issues/410","id":139978456,"user":{"login":"spoike","id":9253,"avatar_url":"https://avatars.githubusercontent.com/u/9253?v=3","gravatar_id":"","url":"https://api.github.com/users/spoike","html_url":"https://github.com/spoike","followers_url":"https://api.github.com/users/spoike/followers","following_url":"https://api.github.com/users/spoike/following{/other_user}","gists_url":"https://api.github.com/users/spoike/gists{/gist_id}","starred_url":"https://api.github.com/users/spoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoike/subscriptions","organizations_url":"https://api.github.com/users/spoike/orgs","repos_url":"https://api.github.com/users/spoike/repos","events_url":"https://api.github.com/users/spoike/events{/privacy}","received_events_url":"https://api.github.com/users/spoike/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T06:51:45Z","updated_at":"2015-09-14T06:51:45Z","body":"@compulim Yes, you should be able since 0.2.12. See also #391."}}