@brightspace-ui/core 3.257.1 → 3.257.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.
|
@@ -737,20 +737,10 @@ class Calendar extends LocalizeCoreElement(LitElement) {
|
|
|
737
737
|
break;
|
|
738
738
|
case keyCodes.HOME: {
|
|
739
739
|
preventDefault = true;
|
|
740
|
-
let numDaysChange;
|
|
741
740
|
const dayOfTheWeek = this._focusDate.getDay();
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
numDaysChange -= daysInWeek;
|
|
746
|
-
}
|
|
747
|
-
} else {
|
|
748
|
-
numDaysChange = dayOfTheWeek - calendarData.firstDayOfWeek;
|
|
749
|
-
if (numDaysChange < 0) {
|
|
750
|
-
numDaysChange += daysInWeek;
|
|
751
|
-
}
|
|
752
|
-
numDaysChange *= -1;
|
|
753
|
-
}
|
|
741
|
+
let numDaysChange = dayOfTheWeek - calendarData.firstDayOfWeek;
|
|
742
|
+
if (numDaysChange < 0) numDaysChange += daysInWeek;
|
|
743
|
+
numDaysChange *= -1;
|
|
754
744
|
const possibleFocusDate = new Date(
|
|
755
745
|
this._focusDate.getFullYear(),
|
|
756
746
|
this._focusDate.getMonth(),
|
|
@@ -761,20 +751,9 @@ class Calendar extends LocalizeCoreElement(LitElement) {
|
|
|
761
751
|
break;
|
|
762
752
|
} case keyCodes.END: {
|
|
763
753
|
preventDefault = true;
|
|
764
|
-
let numDaysChange;
|
|
765
754
|
const dayOfTheWeek = this._focusDate.getDay();
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
if (numDaysChange < 0) {
|
|
769
|
-
numDaysChange += daysInWeek;
|
|
770
|
-
}
|
|
771
|
-
numDaysChange *= -1;
|
|
772
|
-
} else {
|
|
773
|
-
numDaysChange = 6 - dayOfTheWeek + calendarData.firstDayOfWeek;
|
|
774
|
-
if (numDaysChange > 6) {
|
|
775
|
-
numDaysChange -= daysInWeek;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
755
|
+
let numDaysChange = 6 - dayOfTheWeek + calendarData.firstDayOfWeek;
|
|
756
|
+
if (numDaysChange > 6) numDaysChange -= daysInWeek;
|
|
778
757
|
const possibleFocusDate = new Date(
|
|
779
758
|
this._focusDate.getFullYear(),
|
|
780
759
|
this._focusDate.getMonth(),
|
|
@@ -356,7 +356,8 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
async _handleResize() {
|
|
359
|
-
|
|
359
|
+
let refocus = getComposedActiveElement();
|
|
360
|
+
if (!isComposedAncestor(this, refocus)) refocus = null;
|
|
360
361
|
this._contentReady = false;
|
|
361
362
|
this._chompIndex = 10000;
|
|
362
363
|
await this.updateComplete;
|
|
@@ -373,12 +374,13 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
373
374
|
}
|
|
374
375
|
this._contentReady = true;
|
|
375
376
|
await this.updateComplete;
|
|
376
|
-
refocus
|
|
377
|
+
refocus?.focus?.();
|
|
377
378
|
}
|
|
378
379
|
|
|
379
380
|
async _handleSlotChange() {
|
|
380
381
|
if (!this._hasResized) return;
|
|
381
|
-
|
|
382
|
+
let refocus = getComposedActiveElement();
|
|
383
|
+
if (!isComposedAncestor(this, refocus)) refocus = null;
|
|
382
384
|
this._contentReady = false;
|
|
383
385
|
await this.updateComplete;
|
|
384
386
|
|
|
@@ -405,7 +407,7 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
|
405
407
|
this._refocus = this.shadowRoot.querySelector('.d2l-tag-list-button');
|
|
406
408
|
}
|
|
407
409
|
await this._refocus?.updateComplete;
|
|
408
|
-
(this._refocus || refocus)
|
|
410
|
+
(this._refocus || refocus)?.focus?.();
|
|
409
411
|
this._refocus = null;
|
|
410
412
|
}
|
|
411
413
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.257.
|
|
3
|
+
"version": "3.257.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",
|