JQL editor (@atlassianlabs/jql-editor) bugs and problems

Hello,

I am using JQL editor in my projects (some plugins for Jira DC) and I have faced with some bugs.
@atlassianlabs/jql-editor → 2.0.1
@atlassianlabs/jql-editor-autocomplete-rest → 1.1.2

  1. Helper Message Display Issue in Jira Versions <= 8.16.1: In Jira versions up to 8.16.1, the helper message for the JQL input is not displayed correctly, revealing HTML tags (e.g., )

  2. Autocomplete Menu Behavior in Older Jira Versions: I have observed that the autocomplete popup menu behaves inconsistently in earlier versions of Jira (<= 8.16.1). It sometimes appears at the top or bottom of the page, occasionally overlapping the JQL input field, which obstructs the selected options.

  3. Shortcut Key Interference: When utilizing the editor input, Jira’s shortcut keys are not being disabled. For example, typing "Project = " inadvertently triggers the issue creation modal due to the “C” shortcut, or for W opens Worklogs modal. Although I have temporarily resolved this issue by preventing event propagation for the keypress event. Buy I guess it is a bug in the library(

useEffect(() => {
        const handleKeyEvent = (event: Event) => {
            event.stopPropagation();
        };
        const editableDiv = document.querySelector('div[contenteditable="true"]');

        if (editableDiv) {
            editableDiv.addEventListener("keypress", handleKeyEvent);
        }

        return () => {
            if (editableDiv) {
                editableDiv.removeEventListener("keypress", handleKeyEvent);
            }
        };
    }, []);

Any ideas how fist and second bugs could be fixed? Will be very thankful for some help,

Viktoriia

2 Likes