From 1ccada6e7128f94e17ea1f6088ee1f18da02d76d Mon Sep 17 00:00:00 2001 From: Brenden Tuck Date: Sun, 21 Oct 2018 10:03:54 -0400 Subject: [PATCH] Fix #1686 cursor placement issues --- .../web/webclient/static/webclient/js/plugins/history.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/evennia/web/webclient/static/webclient/js/plugins/history.js b/evennia/web/webclient/static/webclient/js/plugins/history.js index c33dbcabf9..60b1a2b163 100644 --- a/evennia/web/webclient/static/webclient/js/plugins/history.js +++ b/evennia/web/webclient/static/webclient/js/plugins/history.js @@ -69,8 +69,12 @@ let history_plugin = (function () { } if (history_entry !== null) { - // Doing a history navigation; replace the text in the input. - inputfield.val(history_entry); + // Performing a history navigation + // 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;