@brightspace-ui/core 2.10.1 → 2.10.4
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.
|
@@ -14,7 +14,8 @@ import { tryGetIfrauBackdropService } from '../../helpers/ifrauBackdropService.j
|
|
|
14
14
|
window.D2L = window.D2L || {};
|
|
15
15
|
window.D2L.DialogMixin = window.D2L.DialogMixin || {};
|
|
16
16
|
|
|
17
|
-
window.D2L.DialogMixin.hasNative = (window.HTMLDialogElement !== undefined)
|
|
17
|
+
window.D2L.DialogMixin.hasNative = (window.HTMLDialogElement !== undefined)
|
|
18
|
+
&& (navigator.vendor && navigator.vendor.toLowerCase().indexOf('apple') === -1);
|
|
18
19
|
if (window.D2L.DialogMixin.preferNative === undefined) {
|
|
19
20
|
window.D2L.DialogMixin.preferNative = true;
|
|
20
21
|
}
|
|
@@ -142,6 +142,18 @@
|
|
|
142
142
|
</mfrac>
|
|
143
143
|
</mrow>
|
|
144
144
|
<mtext>.</mtext>
|
|
145
|
+
<mspace linebreak="newline"></mspace>
|
|
146
|
+
<msup>
|
|
147
|
+
<mi>e</mi>
|
|
148
|
+
<mrow>
|
|
149
|
+
<mi>i</mi>
|
|
150
|
+
<mi>π<!-- π --></mi>
|
|
151
|
+
</mrow>
|
|
152
|
+
</msup>
|
|
153
|
+
<mo>+</mo>
|
|
154
|
+
<mn>1</mn>
|
|
155
|
+
<mo>=</mo>
|
|
156
|
+
<mn>0</mn>
|
|
145
157
|
</math>
|
|
146
158
|
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
|
147
159
|
<msup>
|
|
@@ -72,7 +72,10 @@ export const TagListItemMixin = superclass => class extends superclass {
|
|
|
72
72
|
super.firstUpdated(changedProperties);
|
|
73
73
|
|
|
74
74
|
const container = this.shadowRoot.querySelector('.tag-list-item-container');
|
|
75
|
-
this.addEventListener('focus', () =>
|
|
75
|
+
this.addEventListener('focus', (e) => {
|
|
76
|
+
// ignore focus events coming from inside the tag content
|
|
77
|
+
if (e.composedPath()[0] === this) container.focus();
|
|
78
|
+
});
|
|
76
79
|
this.addEventListener('blur', () => container.blur());
|
|
77
80
|
}
|
|
78
81
|
|
package/helpers/mathjax.js
CHANGED
|
@@ -64,14 +64,21 @@ export class HtmlBlockMathRenderer {
|
|
|
64
64
|
return elem;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
// MathJax 3 does not support newlines, but it does persist styles, so add custom styles to mimic a linebreak
|
|
68
|
+
// This work-around should be removed when linebreaks are natively supported.
|
|
69
|
+
// MathJax issue: https://github.com/mathjax/MathJax/issues/2312
|
|
70
|
+
// A duplicate that explains our exact issue: https://github.com/mathjax/MathJax/issues/2495
|
|
71
|
+
const inner = elem.innerHTML.replaceAll('<mspace linebreak="newline">', '<mspace linebreak="newline" style="display: block; height: 0.5rem;">');
|
|
72
|
+
|
|
67
73
|
const temp = document.createElement('div');
|
|
68
74
|
temp.style.display = 'none';
|
|
69
75
|
temp.attachShadow({ mode: 'open' });
|
|
70
|
-
temp.shadowRoot.innerHTML = `<div><mjx-doc><mjx-head></mjx-head><mjx-body>${
|
|
76
|
+
temp.shadowRoot.innerHTML = `<div><mjx-doc><mjx-head></mjx-head><mjx-body>${inner}</mjx-body></mjx-doc></div>`;
|
|
71
77
|
|
|
72
78
|
elem.appendChild(temp);
|
|
73
79
|
await window.MathJax.startup.promise;
|
|
74
80
|
window.MathJax.typesetShadow(temp.shadowRoot);
|
|
81
|
+
|
|
75
82
|
return temp.shadowRoot.firstChild;
|
|
76
83
|
}
|
|
77
84
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.4",
|
|
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",
|