@brightspace-ui/core 3.123.1 → 3.123.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.
@@ -329,6 +329,36 @@
329
329
  </template>
330
330
  </d2l-demo-snippet>
331
331
 
332
+ <h2>Simple dialog with longer loading content</h2>
333
+
334
+ <d2l-demo-snippet>
335
+ <template>
336
+ <d2l-button>Show Dialog</d2l-button>
337
+ <d2l-dialog title-text="Fullscreen Title">
338
+ </d2l-dialog>
339
+ <d2l-dropdown style="display: none; padding: 30px;">
340
+ <button class="d2l-dropdown-opener">Open!</button>
341
+ <d2l-dropdown-content>
342
+ <a href=" " style="display: block;">A Link</a>
343
+ Some content... Click me!
344
+ </d2l-dropdown-content>
345
+ </d2l-dropdown>
346
+
347
+ <script>
348
+ (demo => {
349
+ demo.querySelector('d2l-button').addEventListener('click', () => {
350
+ demo.querySelector('d2l-dialog').opened = true;
351
+ setTimeout(() => {
352
+ demo.querySelector('d2l-dropdown').style.display = 'block';
353
+ demo.querySelector('d2l-dialog').appendChild(demo.querySelector('d2l-dropdown'));
354
+ demo.querySelector('d2l-dialog').resize();
355
+ }, 1000);
356
+ });
357
+ })(document.currentScript.parentNode);
358
+ </script>
359
+ </template>
360
+ </d2l-demo-snippet>
361
+
332
362
  </d2l-demo-page>
333
363
  </body>
334
364
  </html>
@@ -569,7 +569,8 @@ export const DropdownContentMixin = superclass => class extends LocalizeCoreElem
569
569
  const activeElement = getComposedActiveElement();
570
570
 
571
571
  if (isComposedAncestor(this, activeElement)
572
- || isComposedAncestor(this.__getOpener(), activeElement)) {
572
+ || isComposedAncestor(this.__getOpener(), activeElement)
573
+ || activeElement === this.__previousFocusableAncestor) {
573
574
  return;
574
575
  }
575
576
  this.close();
@@ -954,7 +954,9 @@ export const PopoverMixin = superclass => class extends superclass {
954
954
  }
955
955
 
956
956
  const activeElement = getComposedActiveElement();
957
- if (isComposedAncestor(this, activeElement) || isComposedAncestor(this._opener, activeElement)) {
957
+ if (isComposedAncestor(this, activeElement)
958
+ || isComposedAncestor(this._opener, activeElement)
959
+ || activeElement === this._previousFocusableAncestor) {
958
960
  return;
959
961
  }
960
962
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.123.1",
3
+ "version": "3.123.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",