From d497a028cbcf9de13c42a69004bfec16df969e55 Mon Sep 17 00:00:00 2001 From: Sofien Haj Chedhli Date: Wed, 3 Jun 2026 10:26:37 +0100 Subject: [PATCH] fix: Tag suggestor does not open automatically with the tag icon - EXO-87164 (#751) Prior to this change, clicking the tag icon only inserted a hashtag and did not open the tag suggester. This change updates the tag suggester plugin to automatically open the suggester when the tag icon is clicked. --- .../src/main/webapp/eXoPlugins/tagSuggester/plugin.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/commons-extension-webapp/src/main/webapp/eXoPlugins/tagSuggester/plugin.js b/commons-extension-webapp/src/main/webapp/eXoPlugins/tagSuggester/plugin.js index 6d89aa3a32..9c820f606b 100644 --- a/commons-extension-webapp/src/main/webapp/eXoPlugins/tagSuggester/plugin.js +++ b/commons-extension-webapp/src/main/webapp/eXoPlugins/tagSuggester/plugin.js @@ -37,6 +37,13 @@ require(['SHARED/jquery', 'SHARED/tagSuggester'],function($) { // Define the function that will be fired when the command is executed. exec: function( editor ) { editor.insertText('#'); + setTimeout(() => { + const editable = editor.editable?.() || editor.element; + const $editable = $(editable.$ || editable); + $editable.trigger('input').trigger('keyup').trigger('focus'); + const atwhoData = $editable.data('atwho'); + atwhoData?.['#']?.controller?.view?.show(); + }, 50); document.dispatchEvent(new CustomEvent('editor-option-added', {detail: 'useHash'})); } }); @@ -72,4 +79,4 @@ require(['SHARED/jquery', 'SHARED/tagSuggester'],function($) { }); } }); -}); \ No newline at end of file +});