enable list of tags in tag input without typing two character, and show list on focus, fixes #1498

This commit is contained in:
Umar Sheikh 2017-10-03 17:01:30 +05:00
parent d7eefa1d69
commit e6f6d38ca6

View file

@ -56,7 +56,7 @@ class App.WidgetTag extends App.Controller
source = "#{App.Config.get('api_path')}/tag_search"
@$('.js-newTagInput').autocomplete(
source: source
minLength: 2
minLength: 0
response: (e, ui) =>
return if !ui
return if !ui.content
@ -68,6 +68,7 @@ class App.WidgetTag extends App.Controller
e.preventDefault()
@newTagLabel.addClass('hide')
@newTagInput.removeClass('hide').focus()
@newTagInput.trigger(jQuery.Event("keydown"))
@editMode = true
hideAndAddInput: =>