1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Don't send a new query if the keydown doesn't edit the query value,

i.e. command-tab or shift.
This commit is contained in:
epriestley 2011-04-14 19:16:48 -07:00
parent 40554e2d8a
commit 4e8968aff3

View file

@ -20,6 +20,8 @@ JX.behavior('phabricator-object-selector', function(config) {
'input',
'aphront-dialog-application-input');
var last_value = JX.$(config.query).value;
function onreceive(seq, r) {
if (seq != n) {
return;
@ -161,6 +163,12 @@ JX.behavior('phabricator-object-selector', function(config) {
'keydown',
null,
function(e) {
var cur_value = JX.$(config.query).value;
if (last_value == cur_value) {
return;
}
last_value = cur_value;
if (query_timer) {
query_timer.stop();
}