1
0
mirror of synced 2025-02-18 04:53:15 +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); decorated.call(this, container, $container);
container.on('close', function () { container.on('close', function (evt) {
self._handleSelectOnClose(); self._handleSelectOnClose(evt);
}); });
}; };
SelectOnClose.prototype._handleSelectOnClose = function () { SelectOnClose.prototype._handleSelectOnClose = function (evt) {
var self = this;
var $highlightedResults = this.getHighlightedResults(); var $highlightedResults = this.getHighlightedResults();
if ($highlightedResults.length < 1) { if ($highlightedResults.length < 1) {
return; return;
} }
$highlightedResults.trigger('mouseup'); self.trigger('select', {
originalEvent: evt,
data: $highlightedResults.data('data')
});
}; };
return SelectOnClose; return SelectOnClose;