@momentum-design/components 0.120.24 → 0.120.25

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.
@@ -170,8 +170,8 @@ class Combobox extends CaptureDestroyEventForChildElement(AutoFocusOnMountMixin(
170
170
  * @internal
171
171
  */
172
172
  this.handleDestroyEvent = (event) => {
173
- const destroyedElement = event.target;
174
- if (!this.isValidItem(destroyedElement) || destroyedElement.tabIndex !== 0) {
173
+ const destroyedElement = event.detail.originalTarget;
174
+ if (destroyedElement && (!this.isValidItem(destroyedElement) || destroyedElement.tabIndex !== 0)) {
175
175
  return;
176
176
  }
177
177
  const destroyedItemIndex = this.navItems.findIndex(node => node === destroyedElement);
@@ -69,7 +69,7 @@ class List extends ListNavigationMixin(CaptureDestroyEventForChildElement(Compon
69
69
  * @internal
70
70
  */
71
71
  this.handleDestroyEvent = (event) => {
72
- const destroyedElement = event.target;
72
+ const destroyedElement = event.detail.originalTarget;
73
73
  if (!this.isValidItem(destroyedElement) || destroyedElement.tabIndex !== 0) {
74
74
  return;
75
75
  }