mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 00:26:07 +10:00
Hide suggestions when deleting all input value using other than backspace
This commit is contained in:
@@ -173,8 +173,12 @@ class @SearchAutocomplete
|
||||
@restoreOriginalState()
|
||||
|
||||
else
|
||||
# We should display the menu only when input is not empty
|
||||
if @searchInput.val() isnt ''
|
||||
# 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
|
||||
# We should display the menu only when input is not empty
|
||||
@enableAutocomplete()
|
||||
|
||||
# Avoid falsy value to be returned
|
||||
|
||||
Reference in New Issue
Block a user