Skip to content

Deleting the whole text only deletes the last character in the buffer #188

Description

@Dina-Nashaat

BUG:
If I select all text and then delete with a backspace, only the last character is deleted in the buffer, and the autocomplete still shows with the highlight.

screen shot 2018-12-26 at 1 54 19 am

SOLUTION:
Adding a trigger on keyup seems to solve the problem.

add this line in initTextarea (line 97)
elmInputBox.bind('keyup', onInputBoxKeyUp);
and add a new function (line 392)

        function onInputBoxKeyUp(e) {
            if (e.keyCode === KEY.BACKSPACE) {
                syntaxMessage = getInputBoxValue()
                if(!syntaxMessage){
                    resetBuffer();
                    hideAutoComplete();
                }
                return;
            }
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions