@aurodesignsystem-dev/auro-formkit 0.0.0-pr740.6 → 0.0.0-pr740.7

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.
@@ -16180,7 +16180,7 @@ class AuroCombobox extends AuroElement$1 {
16180
16180
  // wait a frame in case the bib gets hide immediately after showing because there is no value
16181
16181
  setTimeout(() => {
16182
16182
  if (document.activeElement === this) {
16183
- this.focus();
16183
+ this.setInputFocus();
16184
16184
  }
16185
16185
  }, 0);
16186
16186
  });
@@ -16199,13 +16199,24 @@ class AuroCombobox extends AuroElement$1 {
16199
16199
  this.hideBib = this.hideBib.bind(this);
16200
16200
  this.bibtemplate.addEventListener('close-click', this.hideBib);
16201
16201
 
16202
- this.focus = this.focus.bind(this);
16202
+ this.setInputFocus = this.setInputFocus.bind(this);
16203
16203
  this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
16204
16204
  // event when the strategy(bib mode) is changed between fullscreen and floating
16205
- setTimeout(this.focus, 0);
16205
+ setTimeout(this.setInputFocus, 0);
16206
16206
  });
16207
16207
  }
16208
16208
 
16209
+ /**
16210
+ * @private
16211
+ */
16212
+ setInputFocus() {
16213
+ if (this.dropdown.isBibFullscreen && this.dropdown.isPopoverVisible) {
16214
+ this.inputInBib.focus();
16215
+ } else {
16216
+ this.input.focus();
16217
+ }
16218
+ }
16219
+
16209
16220
  /**
16210
16221
  * Binds all behavior needed to the menu after rendering.
16211
16222
  * @private
@@ -16317,9 +16328,14 @@ class AuroCombobox extends AuroElement$1 {
16317
16328
  /**
16318
16329
  * Validate every time we remove focus from the datepicker.
16319
16330
  */
16320
- this.addEventListener('focusout', () => {
16331
+ this.addEventListener('focusout', (event) => {
16321
16332
  if (document.activeElement !== this) {
16322
16333
  this.validate();
16334
+ if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16335
+ event.preventDefault();
16336
+ event.stopImmediatePropagation();
16337
+ this.focus();
16338
+ }
16323
16339
  }
16324
16340
  });
16325
16341
 
@@ -16495,10 +16511,8 @@ class AuroCombobox extends AuroElement$1 {
16495
16511
  * @returns {void}
16496
16512
  */
16497
16513
  focus() {
16498
- if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16499
- this.inputInBib.focus();
16500
- } else {
16501
- this.input.focus();
16514
+ if (document.activeElement !== this) {
16515
+ this.setInputFocus();
16502
16516
  }
16503
16517
  }
16504
16518
 
@@ -16038,7 +16038,7 @@ class AuroCombobox extends AuroElement$1 {
16038
16038
  // wait a frame in case the bib gets hide immediately after showing because there is no value
16039
16039
  setTimeout(() => {
16040
16040
  if (document.activeElement === this) {
16041
- this.focus();
16041
+ this.setInputFocus();
16042
16042
  }
16043
16043
  }, 0);
16044
16044
  });
@@ -16057,13 +16057,24 @@ class AuroCombobox extends AuroElement$1 {
16057
16057
  this.hideBib = this.hideBib.bind(this);
16058
16058
  this.bibtemplate.addEventListener('close-click', this.hideBib);
16059
16059
 
16060
- this.focus = this.focus.bind(this);
16060
+ this.setInputFocus = this.setInputFocus.bind(this);
16061
16061
  this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
16062
16062
  // event when the strategy(bib mode) is changed between fullscreen and floating
16063
- setTimeout(this.focus, 0);
16063
+ setTimeout(this.setInputFocus, 0);
16064
16064
  });
16065
16065
  }
16066
16066
 
16067
+ /**
16068
+ * @private
16069
+ */
16070
+ setInputFocus() {
16071
+ if (this.dropdown.isBibFullscreen && this.dropdown.isPopoverVisible) {
16072
+ this.inputInBib.focus();
16073
+ } else {
16074
+ this.input.focus();
16075
+ }
16076
+ }
16077
+
16067
16078
  /**
16068
16079
  * Binds all behavior needed to the menu after rendering.
16069
16080
  * @private
@@ -16175,9 +16186,14 @@ class AuroCombobox extends AuroElement$1 {
16175
16186
  /**
16176
16187
  * Validate every time we remove focus from the datepicker.
16177
16188
  */
16178
- this.addEventListener('focusout', () => {
16189
+ this.addEventListener('focusout', (event) => {
16179
16190
  if (document.activeElement !== this) {
16180
16191
  this.validate();
16192
+ if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16193
+ event.preventDefault();
16194
+ event.stopImmediatePropagation();
16195
+ this.focus();
16196
+ }
16181
16197
  }
16182
16198
  });
16183
16199
 
@@ -16353,10 +16369,8 @@ class AuroCombobox extends AuroElement$1 {
16353
16369
  * @returns {void}
16354
16370
  */
16355
16371
  focus() {
16356
- if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16357
- this.inputInBib.focus();
16358
- } else {
16359
- this.input.focus();
16372
+ if (document.activeElement !== this) {
16373
+ this.setInputFocus();
16360
16374
  }
16361
16375
  }
16362
16376
 
@@ -332,10 +332,9 @@ export class AuroCombobox extends AuroElement {
332
332
  bibtemplate: any;
333
333
  inputInBib: any;
334
334
  /**
335
- * Focuses the combobox trigger input.
336
- * @returns {void}
335
+ * @private
337
336
  */
338
- focus(): void;
337
+ private setInputFocus;
339
338
  /**
340
339
  * Binds all behavior needed to the menu after rendering.
341
340
  * @private
@@ -381,6 +380,11 @@ export class AuroCombobox extends AuroElement {
381
380
  firstUpdated(): void;
382
381
  dropdown: any;
383
382
  input: any;
383
+ /**
384
+ * Focuses the combobox trigger input.
385
+ * @returns {void}
386
+ */
387
+ focus(): void;
384
388
  /**
385
389
  * Resets component to initial state.
386
390
  * @returns {void}
@@ -15956,7 +15956,7 @@ class AuroCombobox extends AuroElement {
15956
15956
  // wait a frame in case the bib gets hide immediately after showing because there is no value
15957
15957
  setTimeout(() => {
15958
15958
  if (document.activeElement === this) {
15959
- this.focus();
15959
+ this.setInputFocus();
15960
15960
  }
15961
15961
  }, 0);
15962
15962
  });
@@ -15975,13 +15975,24 @@ class AuroCombobox extends AuroElement {
15975
15975
  this.hideBib = this.hideBib.bind(this);
15976
15976
  this.bibtemplate.addEventListener('close-click', this.hideBib);
15977
15977
 
15978
- this.focus = this.focus.bind(this);
15978
+ this.setInputFocus = this.setInputFocus.bind(this);
15979
15979
  this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
15980
15980
  // event when the strategy(bib mode) is changed between fullscreen and floating
15981
- setTimeout(this.focus, 0);
15981
+ setTimeout(this.setInputFocus, 0);
15982
15982
  });
15983
15983
  }
15984
15984
 
15985
+ /**
15986
+ * @private
15987
+ */
15988
+ setInputFocus() {
15989
+ if (this.dropdown.isBibFullscreen && this.dropdown.isPopoverVisible) {
15990
+ this.inputInBib.focus();
15991
+ } else {
15992
+ this.input.focus();
15993
+ }
15994
+ }
15995
+
15985
15996
  /**
15986
15997
  * Binds all behavior needed to the menu after rendering.
15987
15998
  * @private
@@ -16093,9 +16104,14 @@ class AuroCombobox extends AuroElement {
16093
16104
  /**
16094
16105
  * Validate every time we remove focus from the datepicker.
16095
16106
  */
16096
- this.addEventListener('focusout', () => {
16107
+ this.addEventListener('focusout', (event) => {
16097
16108
  if (document.activeElement !== this) {
16098
16109
  this.validate();
16110
+ if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16111
+ event.preventDefault();
16112
+ event.stopImmediatePropagation();
16113
+ this.focus();
16114
+ }
16099
16115
  }
16100
16116
  });
16101
16117
 
@@ -16271,10 +16287,8 @@ class AuroCombobox extends AuroElement {
16271
16287
  * @returns {void}
16272
16288
  */
16273
16289
  focus() {
16274
- if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16275
- this.inputInBib.focus();
16276
- } else {
16277
- this.input.focus();
16290
+ if (document.activeElement !== this) {
16291
+ this.setInputFocus();
16278
16292
  }
16279
16293
  }
16280
16294
 
@@ -15956,7 +15956,7 @@ class AuroCombobox extends AuroElement {
15956
15956
  // wait a frame in case the bib gets hide immediately after showing because there is no value
15957
15957
  setTimeout(() => {
15958
15958
  if (document.activeElement === this) {
15959
- this.focus();
15959
+ this.setInputFocus();
15960
15960
  }
15961
15961
  }, 0);
15962
15962
  });
@@ -15975,13 +15975,24 @@ class AuroCombobox extends AuroElement {
15975
15975
  this.hideBib = this.hideBib.bind(this);
15976
15976
  this.bibtemplate.addEventListener('close-click', this.hideBib);
15977
15977
 
15978
- this.focus = this.focus.bind(this);
15978
+ this.setInputFocus = this.setInputFocus.bind(this);
15979
15979
  this.dropdown.addEventListener('auroDropdown-strategy-change', () => {
15980
15980
  // event when the strategy(bib mode) is changed between fullscreen and floating
15981
- setTimeout(this.focus, 0);
15981
+ setTimeout(this.setInputFocus, 0);
15982
15982
  });
15983
15983
  }
15984
15984
 
15985
+ /**
15986
+ * @private
15987
+ */
15988
+ setInputFocus() {
15989
+ if (this.dropdown.isBibFullscreen && this.dropdown.isPopoverVisible) {
15990
+ this.inputInBib.focus();
15991
+ } else {
15992
+ this.input.focus();
15993
+ }
15994
+ }
15995
+
15985
15996
  /**
15986
15997
  * Binds all behavior needed to the menu after rendering.
15987
15998
  * @private
@@ -16093,9 +16104,14 @@ class AuroCombobox extends AuroElement {
16093
16104
  /**
16094
16105
  * Validate every time we remove focus from the datepicker.
16095
16106
  */
16096
- this.addEventListener('focusout', () => {
16107
+ this.addEventListener('focusout', (event) => {
16097
16108
  if (document.activeElement !== this) {
16098
16109
  this.validate();
16110
+ if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16111
+ event.preventDefault();
16112
+ event.stopImmediatePropagation();
16113
+ this.focus();
16114
+ }
16099
16115
  }
16100
16116
  });
16101
16117
 
@@ -16271,10 +16287,8 @@ class AuroCombobox extends AuroElement {
16271
16287
  * @returns {void}
16272
16288
  */
16273
16289
  focus() {
16274
- if (this.dropdown.isPopoverVisible && this.dropdown.isBibFullscreen) {
16275
- this.inputInBib.focus();
16276
- } else {
16277
- this.input.focus();
16290
+ if (document.activeElement !== this) {
16291
+ this.setInputFocus();
16278
16292
  }
16279
16293
  }
16280
16294
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem-dev/auro-formkit",
3
- "version": "0.0.0-pr740.6",
3
+ "version": "0.0.0-pr740.7",
4
4
  "description": "A collection of web components used to build forms.",
5
5
  "homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
6
6
  "bugs": {