@brightspace-ui/core 2.186.0 → 2.186.2
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.
- package/components/form/form.js +8 -6
- package/custom-elements.json +4 -0
- package/package.json +1 -1
package/components/form/form.js
CHANGED
@@ -139,23 +139,25 @@ class Form extends FormMixin(LitElement) {
|
|
139
139
|
}
|
140
140
|
e.stopPropagation();
|
141
141
|
e.preventDefault();
|
142
|
+
|
142
143
|
const form = e.composedPath()[0];
|
144
|
+
const target = e.target;
|
143
145
|
|
144
|
-
if (!this._nestedForms.has(
|
145
|
-
this._nestedForms.set(
|
146
|
+
if (!this._nestedForms.has(target)) {
|
147
|
+
this._nestedForms.set(target, []);
|
146
148
|
}
|
147
|
-
this._nestedForms.get(
|
149
|
+
this._nestedForms.get(target).push(form);
|
148
150
|
|
149
151
|
const onFormDisconnect = () => {
|
150
152
|
form.removeEventListener('d2l-form-disconnect', onFormDisconnect);
|
151
|
-
if (this._nestedForms.has(
|
152
|
-
const forms = this._nestedForms.get(
|
153
|
+
if (this._nestedForms.has(target)) {
|
154
|
+
const forms = this._nestedForms.get(target);
|
153
155
|
const index = forms.indexOf(form);
|
154
156
|
if (index > -1) {
|
155
157
|
forms.splice(index, 1);
|
156
158
|
}
|
157
159
|
if (forms.length === 0) {
|
158
|
-
this._nestedForms.delete(
|
160
|
+
this._nestedForms.delete(target);
|
159
161
|
}
|
160
162
|
}
|
161
163
|
};
|
package/custom-elements.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "2.186.
|
3
|
+
"version": "2.186.2",
|
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",
|