From: Go MAEDA Date: Thu, 5 Sep 2024 06:06:58 +0000 (+0000) Subject: Refactor: Remove jQuery usage in inlineAutoComplete function (#41096). X-Git-Tag: 6.0.0~177 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=622bfcde9d6b8f2717d26efd8551bbd8bf8a6030;p=redmine.git Refactor: Remove jQuery usage in inlineAutoComplete function (#41096). git-svn-id: https://svn.redmine.org/redmine/trunk@23016 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index a5f635299..96a9986bb 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1176,8 +1176,8 @@ function inlineAutoComplete(element) { { trigger: '#', values: function (text, cb) { - if (event.target.type === 'text' && $(element).attr('autocomplete') != 'off') { - $(element).attr('autocomplete', 'off'); + if (event.target.type === 'text' && element.getAttribute('autocomplete') != 'off') { + element.setAttribute('autocomplete', 'off'); } // When triggered with text starting with "##", like "##a", the search term will become "#a", // causing the SQL query to fail in finding issues with "a" in the subject.