Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Dina-Nashaat opened this issue Dec 25, 2018 · 0 comments
Open

Comments

@Dina-Nashaat
Copy link

Dina-Nashaat commented Dec 25, 2018

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;
            }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant