Skip to content

Commit

Permalink
Merge pull request #14459 from jeabakker/fixes-5
Browse files Browse the repository at this point in the history
fix(ckeditor): early abort object mentions on closing bracket
  • Loading branch information
jdalsem committed Sep 4, 2023
2 parents e9ba84a + b397601 commit 5fe06a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mod/ckeditor/views/default/ckeditor/config/mentions.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ define(['elgg/Ajax'], function(Ajax) {
}

function findObjects(queryText) {
if (queryText.includes(']')) {
// to allow the use of 'some [text] more text'
// without triggering the mentions functionality
return [];
}

return getLivesearch(queryText, 'objects');
}

Expand Down

0 comments on commit 5fe06a6

Please sign in to comment.