@sumaris-net/ngx-components 18.6.19-alpha4 → 18.6.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8301,6 +8301,9 @@ class MatAutocompleteField {
|
|
|
8301
8301
|
//if (this.debug) console.debug(this.logPrefix + ' Cancelling focus event');
|
|
8302
8302
|
return false;
|
|
8303
8303
|
}
|
|
8304
|
+
// Already focused - fix issue sumaris-app#837 (2 panels opened at the same time)
|
|
8305
|
+
if (this._focused)
|
|
8306
|
+
return false;
|
|
8304
8307
|
this._focused = true;
|
|
8305
8308
|
// DEBUG
|
|
8306
8309
|
//if (this.debug) console.debug(this.logPrefix + ' Select input content');
|
|
@@ -8309,7 +8312,7 @@ class MatAutocompleteField {
|
|
|
8309
8312
|
if (!hasContent || this.showPanelOnFocus || this.showAllOnFocus) {
|
|
8310
8313
|
// DEBUG
|
|
8311
8314
|
//if (this.debug) console.debug(this.logPrefix + ' Emit focus event');
|
|
8312
|
-
// Need a delay to prevent early focus event, just after a blur event (see
|
|
8315
|
+
// Need a delay to prevent early focus event, just after a blur event (see issue sumaris-app#837 - 2 panels opened)
|
|
8313
8316
|
setTimeout(() => {
|
|
8314
8317
|
if (!this._focused)
|
|
8315
8318
|
return; // Skip if blur event received
|
|
@@ -8336,6 +8339,9 @@ class MatAutocompleteField {
|
|
|
8336
8339
|
//if (this.debug) console.debug(this.logPrefix + " Cancelling blur event");
|
|
8337
8340
|
return;
|
|
8338
8341
|
}
|
|
8342
|
+
// Already blurred: skip
|
|
8343
|
+
if (!this._focused)
|
|
8344
|
+
return;
|
|
8339
8345
|
this._focused = false;
|
|
8340
8346
|
// Need a delay to prevent early blur event without triggering formChange event
|
|
8341
8347
|
setTimeout(() => {
|