Skip to content

Commit 55fee88

Browse files
author
xaver
committed
combobox can send now focused with enter when a complete match exsits like 5 in priority in spamfilters
1 parent 1f1c39a commit 55fee88

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

interface/web/themes/default_combobox/templates/main.tpl.htm

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,19 @@
136136
return false;
137137
}
138138
}
139-
}
139+
},
140+
// open: function(event, ui) { }, alternativ event for check by enter input
141+
search: function(event, ui) {
142+
if ( !ui.item ) {
143+
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
144+
valid = false;
145+
select.children( "option" ).each(function() {
146+
if ( $( this ).text().match( matcher ) ) {
147+
this.selected = valid = true;
148+
return false;
149+
}
150+
});
151+
} }
140152
})
141153
.addClass( "ui-widget ui-widget-content ui-corner-left" );
142154

0 commit comments

Comments
 (0)