mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +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',
|
'input',
|
||||||
'aphront-dialog-application-input');
|
'aphront-dialog-application-input');
|
||||||
|
|
||||||
|
var last_value = JX.$(config.query).value;
|
||||||
|
|
||||||
function onreceive(seq, r) {
|
function onreceive(seq, r) {
|
||||||
if (seq != n) {
|
if (seq != n) {
|
||||||
return;
|
return;
|
||||||
|
@ -161,6 +163,12 @@ JX.behavior('phabricator-object-selector', function(config) {
|
||||||
'keydown',
|
'keydown',
|
||||||
null,
|
null,
|
||||||
function(e) {
|
function(e) {
|
||||||
|
var cur_value = JX.$(config.query).value;
|
||||||
|
if (last_value == cur_value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
last_value = cur_value;
|
||||||
|
|
||||||
if (query_timer) {
|
if (query_timer) {
|
||||||
query_timer.stop();
|
query_timer.stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue