@brightspace-ui/core 3.112.2 → 3.112.3

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.
@@ -74,8 +74,17 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
74
74
  if (this._getDescendantClicked(e)) {
75
75
  e.preventDefault();
76
76
  } else {
77
+ e.stopPropagation();
77
78
  /** Dispatched when the item's primary button action is clicked */
78
79
  this.dispatchEvent(new CustomEvent('d2l-list-item-button-click', { bubbles: true }));
80
+
81
+ // Dispatches click event from the list item to maintain existing functionality in consumers that listen for the click event
82
+ const listItemClickEvent = new e.constructor(e.type, e);
83
+ listItemClickEvent.preventDefault = () => {
84
+ e.preventDefault();
85
+ };
86
+ /** @ignore */
87
+ this.dispatchEvent(listItemClickEvent);
79
88
  }
80
89
  }
81
90
 
@@ -60,8 +60,17 @@ export const ListItemLinkMixin = superclass => class extends ListItemMixin(super
60
60
  if (this._getDescendantClicked(e)) {
61
61
  e.preventDefault();
62
62
  } else {
63
+ e.stopPropagation();
63
64
  /** Dispatched when the item's primary link action is clicked */
64
65
  this.dispatchEvent(new CustomEvent('d2l-list-item-link-click', { bubbles: true }));
66
+
67
+ // Dispatches click event from the list item to maintain existing functionality in consumers that listen for the click event
68
+ const listItemClickEvent = new e.constructor(e.type, e);
69
+ listItemClickEvent.preventDefault = () => {
70
+ e.preventDefault();
71
+ };
72
+ /** @ignore */
73
+ this.dispatchEvent(listItemClickEvent);
65
74
  }
66
75
  }
67
76
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.112.2",
3
+ "version": "3.112.3",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",