diff options
author | enahum <nahumhbl@gmail.com> | 2016-06-06 15:54:02 -0300 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-06-06 14:54:02 -0400 |
commit | 65f51c7bc4bb0b85532a23171306ba7d331c2fd9 (patch) | |
tree | c3c5bb661dd962447c198bb3f8c54b2a3f47d413 /webapp/components/suggestion/suggestion_box.jsx | |
parent | c0d1b8fbb9a141b942d73ad4869e612cdf01bbcd (diff) | |
download | chat-65f51c7bc4bb0b85532a23171306ba7d331c2fd9.tar.gz chat-65f51c7bc4bb0b85532a23171306ba7d331c2fd9.tar.bz2 chat-65f51c7bc4bb0b85532a23171306ba7d331c2fd9.zip |
PLT-3056 Fix Unable to type quickly in post textbox in IE11 (#3249)
Diffstat (limited to 'webapp/components/suggestion/suggestion_box.jsx')
-rw-r--r-- | webapp/components/suggestion/suggestion_box.jsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/webapp/components/suggestion/suggestion_box.jsx b/webapp/components/suggestion/suggestion_box.jsx index 0ed9449ed..6260e179c 100644 --- a/webapp/components/suggestion/suggestion_box.jsx +++ b/webapp/components/suggestion/suggestion_box.jsx @@ -84,10 +84,8 @@ export default class SuggestionBox extends React.Component { handleCompleteWord(term, matchedPretext) { const textbox = ReactDOM.findDOMNode(this.refs.textbox); const caret = Utils.getCaretPosition(textbox); - - const text = this.props.value; + const text = textbox.value; const pretext = text.substring(0, caret); - let prefix; if (pretext.endsWith(matchedPretext)) { prefix = pretext.substring(0, pretext.length - matchedPretext.length); @@ -104,6 +102,7 @@ export default class SuggestionBox extends React.Component { if (this.props.onUserInput) { this.props.onUserInput(prefix + term + ' ' + suffix); } + this.refs.textbox.value = (prefix + term + ' ' + suffix); // set the caret position after the next rendering window.requestAnimationFrame(() => { |