@brightspace-ui/core 3.343.1 → 3.343.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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../selection/selection-input.js';
|
|
2
2
|
import { css, html, nothing } from 'lit';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { getFlag } from '../../helpers/flags.js';
|
|
4
5
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
5
6
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
7
|
import { isInteractiveInListItemComposedPath } from './list-item-mixin.js';
|
|
@@ -149,6 +150,14 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
|
|
|
149
150
|
}
|
|
150
151
|
}
|
|
151
152
|
|
|
153
|
+
_onMouseDownSelection(e) {
|
|
154
|
+
// remove this line when cleaning up GAUD-10409-prefer-native-general-dialogs and GAUD-10336-prefer-native-fullscreen-dialogs
|
|
155
|
+
if (!getFlag('GAUD-10409-prefer-native-general-dialogs', true) || !getFlag('GAUD-10336-prefer-native-fullscreen-dialogs', true)) return;
|
|
156
|
+
|
|
157
|
+
// prevent focus from moving to dialog or body elements when user clicks non-focusable selection overlay
|
|
158
|
+
e.preventDefault();
|
|
159
|
+
}
|
|
160
|
+
|
|
152
161
|
_onMouseEnterSelection() {
|
|
153
162
|
this._hoveringSelection = !this.selectionDisabled;
|
|
154
163
|
}
|
|
@@ -194,6 +203,7 @@ export const ListItemCheckboxMixin = superclass => class extends SkeletonMixin(s
|
|
|
194
203
|
<div class="d2l-checkbox-action"
|
|
195
204
|
aria-hidden="${ifDefined(inner ? undefined : 'true')}"
|
|
196
205
|
@click="${this._onCheckboxActionClick}"
|
|
206
|
+
@mousedown="${this._onMouseDownSelection}"
|
|
197
207
|
@mouseenter="${this._onMouseEnterSelection}"
|
|
198
208
|
@mouseleave="${this._onMouseLeaveSelection}">
|
|
199
209
|
${inner}
|
|
@@ -8,6 +8,7 @@ import { css, html, nothing } from 'lit';
|
|
|
8
8
|
import { getComposedActiveElement, getFirstFocusableDescendant, getPreviousFocusableAncestor } from '../../helpers/focus.js';
|
|
9
9
|
import { _offscreenStyleDeclarations } from '../offscreen/offscreen.js';
|
|
10
10
|
import { classMap } from 'lit/directives/class-map.js';
|
|
11
|
+
import { getFlag } from '../../helpers/flags.js';
|
|
11
12
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
12
13
|
import { tryGetIfrauBackdropService } from '../../helpers/ifrauBackdropService.js';
|
|
13
14
|
import { waitForElem } from '../../helpers/internal/waitForElem.js';
|
|
@@ -674,16 +675,22 @@ export const PopoverMixin = superclass => class extends superclass {
|
|
|
674
675
|
|
|
675
676
|
// todo: try to use relatedTarget instead - this logic is largely copied as-is from dropdown simply to mitigate risk of this fragile code
|
|
676
677
|
setTimeout(() => {
|
|
678
|
+
|
|
679
|
+
const activeElement = getComposedActiveElement();
|
|
680
|
+
|
|
681
|
+
// remove usingNativeDialogs when cleaning up GAUD-10409-prefer-native-general-dialogs and GAUD-10336-prefer-native-fullscreen-dialogs
|
|
682
|
+
const usingNativeDialogs = getFlag('GAUD-10409-prefer-native-general-dialogs', true) || getFlag('GAUD-10336-prefer-native-fullscreen-dialogs', true);
|
|
683
|
+
|
|
677
684
|
// we ignore focusable ancestors othrwise the popover will close when user clicks empty space inside the popover
|
|
678
685
|
if (!this._opened
|
|
679
686
|
|| this._noAutoClose
|
|
680
687
|
|| !document.activeElement
|
|
681
688
|
|| document.activeElement === this._previousFocusableAncestor
|
|
682
|
-
|| document.activeElement === document.body
|
|
689
|
+
|| document.activeElement === document.body
|
|
690
|
+
|| (activeElement.tagName === 'DIALOG' && usingNativeDialogs)) {
|
|
683
691
|
return;
|
|
684
692
|
}
|
|
685
693
|
|
|
686
|
-
const activeElement = getComposedActiveElement();
|
|
687
694
|
if (isComposedAncestor(this, activeElement)
|
|
688
695
|
|| isComposedAncestor(this._opener, activeElement)
|
|
689
696
|
|| activeElement === this._previousFocusableAncestor) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.343.
|
|
3
|
+
"version": "3.343.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",
|