Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25797

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

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 15.5-rc-1
    • CKEditor
    • None
    • Unknown

    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).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: