From 3c0de1713367ffecfe4606ad0553a550f568e74d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 6 Apr 2017 17:00:12 -0400 Subject: [PATCH] js: set cursor to the end of autofocus input string --- public/js/gogs.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/js/gogs.js b/public/js/gogs.js index 9f8783cb8..a96d35ff2 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -1153,6 +1153,11 @@ function initWebhookSettings() { $(document).ready(function () { csrf = $('meta[name=_csrf]').attr("content"); suburl = $('meta[name=_suburl]').attr("content"); + + // Set cursor to the end of autofocus input string + $('input[autofocus]').each(function () { + $(this).val($(this).val()); + }) // Show exact time $('.time-since').each(function () {