mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
dont query 2nd time after losing focus
This commit is contained in:
parent
d1301fa642
commit
993bc36096
@ -180,6 +180,9 @@ export class LoginViewModel extends ViewModel {
|
|||||||
async queryHomeServer() {
|
async queryHomeServer() {
|
||||||
this._errorMessage = "";
|
this._errorMessage = "";
|
||||||
this.emitChange("errorMessage");
|
this.emitChange("errorMessage");
|
||||||
|
// if query is called before the typing timeout hits (e.g. field lost focus), cancel the timeout so we don't query again.
|
||||||
|
this._abortHomeserverQueryTimeout = this.disposeTracked(this._abortHomeserverQueryTimeout);
|
||||||
|
// cancel ongoing query operation, if any
|
||||||
this._abortQueryOperation = this.disposeTracked(this._abortQueryOperation);
|
this._abortQueryOperation = this.disposeTracked(this._abortQueryOperation);
|
||||||
this._disposeViewModels();
|
this._disposeViewModels();
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user