Made SuggestionBox take back keyboard focus after the user clicks on a suggestion (#4112)

This commit is contained in:
Harrison Healey
2016-09-28 18:35:13 -04:00
committed by enahum
parent b666ef6254
commit d298e99d9b

View File

@@ -113,6 +113,8 @@ export default class SuggestionBox extends React.Component {
this.props.onInput(e);
}
textbox.focus();
// set the caret position after the next rendering
window.requestAnimationFrame(() => {
Utils.setCaretPosition(textbox, prefix.length + term.length + 1);