From 7805404b47134cb9b5cce3e192d84828af888d33 Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Thu, 19 Oct 2017 09:12:08 -0700 Subject: [PATCH] Use timeout on tag box cursor calculation --- app/assets/javascripts/related_tag.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/related_tag.js b/app/assets/javascripts/related_tag.js index 7a82992ab..def95d0af 100644 --- a/app/assets/javascripts/related_tag.js +++ b/app/assets/javascripts/related_tag.js @@ -261,8 +261,8 @@ Danbooru.RelatedTag.process_artist(Danbooru.RelatedTag.recent_artist); } - $field.focus(); - $field.prop('selectionStart', $field.val().length); + //The timeout is needed on Chrome since it will clobber the field attribute otherwise + setTimeout(function () { $field.prop('selectionStart', $field.val().length);}, 100); e.preventDefault(); }