Commit d5b4b4e0 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Hide suggestions when deleting all input value using other than backspace

parent 07a0278d
...@@ -172,9 +172,13 @@ class @SearchAutocomplete ...@@ -172,9 +172,13 @@ class @SearchAutocomplete
when KEYCODE.ESCAPE when KEYCODE.ESCAPE
@restoreOriginalState() @restoreOriginalState()
else
# Handle the case when deleting the input value other than backspace
# e.g. Pressing ctrl + backspace or ctrl + x
if @searchInput.val() is ''
@disableAutocomplete()
else else
# We should display the menu only when input is not empty # We should display the menu only when input is not empty
if @searchInput.val() isnt ''
@enableAutocomplete() @enableAutocomplete()
# Avoid falsy value to be returned # Avoid falsy value to be returned
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment