This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-3cd26a05-6cd8-45a6-a94e-28570a899da5 XWIKI-25797 Open

AdvancedAutoComplete should support the minChars option, like the CKEditor mentions configuration

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-95b236d6-ff29-4203-8fd6-07b8172c088a Vincent Massol created this issue on 18/Nov/26 19:32
 
Summary: AdvancedAutoComplete should support the minChars option, like the CKEditor mentions configuration
Issue Type: cid:jira-generated-image-avatar-3cd26a05-6cd8-45a6-a94e-28570a899da5 Improvement
Affects Versions: 15.5-rc-1
Assignee: Unassigned
Components: CKEditor
Created: 18/Nov/26 19:32
Priority: cid:jira-generated-image-static-major-ae3ca5e0-adfd-4a9c-8a91-5637d02b5421 Major
Reporter: Vincent Massol
Description:

Extensions add their own autocomplete to the WYSIWYG editor with CKEDITOR.plugins.AdvancedAutoComplete, from the xwiki-slash plugin. Unlike the CKEditor mentions configuration used by the link, image and icon autocompletes, it ignores the minChars option: its default textTestCallback matches the marker followed by .{0,30}, so dataCallback is called from the first keystroke after the marker, with an empty query.

Since the platform's own autocompletes pass minChars, extensions pass it too and expect it to work. They then send a request for each character typed, starting with an empty one, e.g. the OpenProject work package search: https://github.com/xwikisas/project-management/issues/648

Proposal

Support minChars in AdvancedAutoComplete, with the same meaning as in the mentions configuration: the minimum number of characters after the marker before dataCallback is called (0 by default, which keeps the current behaviour).