From 0f077865db9c24b5d1439174a48c77f3e2e2f271 Mon Sep 17 00:00:00 2001 From: Katsuya HIDAKA Date: Tue, 6 Aug 2024 17:13:29 +0900 Subject: [PATCH] Fix that ## syntax auto complete does not work --- app/assets/javascripts/application.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 320efd263..b2755d0f9 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1167,6 +1167,11 @@ function inlineAutoComplete(element) { if (event.target.type === 'text' && $(element).attr('autocomplete') != 'off') { $(element).attr('autocomplete', 'off'); } + // When triggered with a text starting with ##, like ##a, the search query will be #a. + // To avoid this, remove the first # from the search query. + if (text) { + text = text.replace(/^#/, ''); + } remoteSearch(getDataSource('issues') + encodeURIComponent(text), function (issues) { return cb(issues); }); -- 2.44.0