1
0
mirror of synced 2024-11-25 14:26:03 +03:00
This commit is contained in:
Brankub 2015-03-24 14:44:23 +02:00
parent 9318980651
commit e10f3b7dae

View File

@ -8,19 +8,24 @@ define([
decorated.call(this, container, $container);
container.on('close', function () {
self._handleSelectOnClose();
container.on('close', function (evt) {
self._handleSelectOnClose(evt);
});
};
SelectOnClose.prototype._handleSelectOnClose = function () {
SelectOnClose.prototype._handleSelectOnClose = function (evt) {
var self = this;
var $highlightedResults = this.getHighlightedResults();
if ($highlightedResults.length < 1) {
return;
}
$highlightedResults.trigger('mouseup');
self.trigger('select', {
originalEvent: evt,
data: $highlightedResults.data('data')
});
};
return SelectOnClose;