@brightspace-ui/core 1.220.1 → 1.220.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.
@@ -283,7 +283,6 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
283
283
  if (!this.opened) return;
284
284
  if (e.keyCode === 27) {
285
285
  // escape (note: prevent native dialog close so we can: animate it; use setDismissible)
286
- e.stopPropagation();
287
286
  e.preventDefault();
288
287
  }
289
288
  }
@@ -268,7 +268,7 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
268
268
  @d2l-hierarchical-view-hide-start="${this._handleDimensionHideStart}"
269
269
  @d2l-hierarchical-view-show-complete="${this._handleDimensionShowComplete}"
270
270
  @d2l-hierarchical-view-show-start="${this._handleDimensionShowStart}"
271
- @keyup="${this._handleDimensionHideKeyPress}"
271
+ @keydown="${this._handleDimensionHideKeyDown}"
272
272
  data-key="${dimension.key}">
273
273
  ${dimensionHTML}
274
274
  </d2l-hierarchical-view>
@@ -357,7 +357,7 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
357
357
  `;
358
358
 
359
359
  return html`
360
- <div slot="header" @keyup="${this._handleDimensionHideKeyPress}">
360
+ <div slot="header" @keydown="${this._handleDimensionHideKeyDown}">
361
361
  ${header}
362
362
  ${actions}
363
363
  </div>
@@ -551,7 +551,7 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
551
551
  if (this.shadowRoot) this.shadowRoot.querySelector(`d2l-hierarchical-view[data-key="${this._activeDimensionKey}"]`).hide();
552
552
  }
553
553
 
554
- _handleDimensionHideKeyPress(e) {
554
+ _handleDimensionHideKeyDown(e) {
555
555
  if (this._activeDimensionKey && (e.keyCode === ARROWLEFT_KEY_CODE || e.keyCode === ESCAPE_KEY_CODE)) {
556
556
  e.stopPropagation();
557
557
  this._handleDimensionHide();
@@ -154,7 +154,7 @@ export const HierarchicalViewMixin = superclass => class extends superclass {
154
154
  firstUpdated(changedProperties) {
155
155
  super.firstUpdated(changedProperties);
156
156
 
157
- this.addEventListener('keyup', this.__onKeyUp);
157
+ this.addEventListener('keydown', this.__onKeyDown);
158
158
  this.addEventListener('d2l-hierarchical-view-hide-start', this.__onHideStart);
159
159
  this.addEventListener('d2l-hierarchical-view-show-start', this.__onShowStart);
160
160
  this.addEventListener('d2l-hierarchical-view-resize', this.__onViewResize);
@@ -477,7 +477,7 @@ export const HierarchicalViewMixin = superclass => class extends superclass {
477
477
 
478
478
  }
479
479
 
480
- __onKeyUp(e) {
480
+ __onKeyDown(e) {
481
481
  if (this.childView && e.keyCode === escapeKeyCode) {
482
482
  e.stopPropagation();
483
483
  this.hide();
@@ -4,7 +4,7 @@ const stack = [];
4
4
 
5
5
  function cleanup() {
6
6
  if (eventListener && stack.length === 0) {
7
- document.removeEventListener('keyup', eventListener);
7
+ document.removeEventListener('keydown', eventListener);
8
8
  eventListener = null;
9
9
  }
10
10
  }
@@ -23,7 +23,7 @@ function init() {
23
23
  }
24
24
  cleanup();
25
25
  };
26
- document.addEventListener('keyup', eventListener);
26
+ document.addEventListener('keydown', eventListener);
27
27
  }
28
28
 
29
29
  export function clearDismissible(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.220.1",
3
+ "version": "1.220.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",