* @param object event
*/
_keyDown: function(event) {
+ // 188 = [,]
if (event === null || event.which === 188) {
var $value = $.trim(this._searchInput.val());
+
+ // read everything left from caret position
+ if (event.which === 188) {
+ $value = $value.substring(0, this._searchInput.getCaret());
+ }
+
if ($value === '') {
return true;
}
});
// reset input
- this._searchInput.val('');
+ if (event.which === 188) {
+ this._searchInput.val($.trim(this._searchInput.val().substr(this._searchInput.getCaret())));
+ }
+ else {
+ this._searchInput.val('');
+ }
if (event !== null) {
event.stopPropagation();