提交 d1ad6390 编写于 作者: A Alfredo Sumaran

Do not fire blur event when clicking a suggestion

上级 5f4ce722
......@@ -145,7 +145,10 @@ class @SearchAutocomplete
@clearInput.on 'click', @onClearInputClick
onDocumentClick: (e) =>
if not $.contains(@dropdown[0], e.target) and @isFocused
# If clicking outside the search box
# And search input is not focused
# And we are not clicking inside a suggestion
if not $.contains(@dropdown[0], e.target) and @isFocused and not $(e.target).parents('ul').length
@onSearchInputBlur()
enableAutocomplete: ->
......@@ -290,5 +293,4 @@ class @SearchAutocomplete
$el.removeClass('is-active')
@disableAutocomplete()
@onSearchInputFocus()
@searchInput.val('').focus()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册