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:
parent
40554e2d8a
commit
4e8968aff3
1 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue