Merge pull request #1207 from copperwall/close-autocompleter-after-submit

Hide autocompleter suggestions on message submit
This commit is contained in:
Igor Zhukov 2016-11-17 20:40:09 +03:00 committed by GitHub
commit 3f4120e50c

View File

@ -1582,6 +1582,8 @@ angular.module('myApp.directives', ['myApp.filters'])
$(submitBtn).on('mousedown touchstart', onMessageSubmit)
function onMessageSubmit (e) {
var self = this
$timeout(function () {
updateValue()
$scope.draftMessage.send()
@ -1589,6 +1591,8 @@ angular.module('myApp.directives', ['myApp.filters'])
if (composerEmojiPanel) {
composerEmojiPanel.update()
}
self.hideSuggestions()
}, shouldFocusOnInteraction ? 0 : 100)
return cancelEvent(e)
}