diff options
author | Unknwon <u@gogs.io> | 2017-04-06 17:00:12 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-06 17:00:12 -0400 |
commit | 3c0de1713367ffecfe4606ad0553a550f568e74d (patch) | |
tree | 6950fb45bb3a70d98df50a0160993a2147cf22c2 | |
parent | bd1f2ccaf87d67a4c5316cc8241abd45386f5c59 (diff) |
js: set cursor to the end of autofocus input string
-rw-r--r-- | public/js/gogs.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js index 9f8783cb..a96d35ff 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 () { |