diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 72d57c0c66..ea7e198cb4 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -67,6 +67,10 @@ /** @type {object} **/ shareeListView: undefined, + events: { + 'input .shareWithField': 'onShareWithFieldChanged' + }, + initialize: function(options) { var view = this; @@ -109,7 +113,18 @@ : options[name]; } - _.bindAll(this, 'autocompleteHandler', '_onSelectRecipient'); + _.bindAll(this, + 'autocompleteHandler', + '_onSelectRecipient', + 'onShareWithFieldChanged' + ); + }, + + onShareWithFieldChanged: function() { + var $el = this.$el.find('.shareWithField'); + if ($el.val().length < 2) { + $el.removeClass('error').tooltip('hide'); + } }, autocompleteHandler: function (search, response) {