Fix #1686 cursor placement issues

This commit is contained in:
Brenden Tuck 2018-10-21 10:03:54 -04:00
parent 52fb3674dc
commit 1ccada6e71

View file

@ -69,8 +69,12 @@ let history_plugin = (function () {
} }
if (history_entry !== null) { if (history_entry !== null) {
// Doing a history navigation; replace the text in the input. // Performing a history navigation
inputfield.val(history_entry); // replace the text in the input and move the cursor to the end of the new value
inputfield.val('');
inputfield.blur().focus().val(history_entry);
event.preventDefault();
return true;
} }
return false; return false;