@pocketprep/ui-kit 3.8.4 → 3.8.5

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.
@@ -70,7 +70,9 @@ export default class ModalContainer extends Vue {
70
70
 
71
71
  // Reset focus to last element in modal so next tab will move it to top
72
72
  const modalContainerEl = this.$refs['modalContainer'] as HTMLElement
73
- const modalFocusableEls = Array.from<HTMLElement>(modalContainerEl.querySelectorAll(focusableSelectors))
73
+ const modalFocusableEls = Array.from<HTMLElement>(modalContainerEl
74
+ .querySelectorAll(focusableSelectors))
75
+ .filter(el => !('disabled' in el && el.disabled === true))
74
76
  if (modalFocusableEls.length) {
75
77
  modalFocusableEls[modalFocusableEls.length - 1]?.focus()
76
78
  modalFocusableEls[modalFocusableEls.length - 1]?.blur()
@@ -81,7 +83,7 @@ export default class ModalContainer extends Vue {
81
83
  if (this.modalNumber === this.numberOfModals()) { // Only focus on the last open panel
82
84
  const target = (event as FocusEvent).target as HTMLElement // The element receiving focus
83
85
  const isFocusOutside = target && modalContainerEl && !modalContainerEl.contains(target)
84
- const hasCalendarClass = target
86
+ const hasCalendarClass = target?.classList
85
87
  && Array.from(target.classList).find(
86
88
  c => c === 'button-next-month' || c === 'button-previous-month' || c === 'day-item'
87
89
  )
@@ -193,7 +193,7 @@ export default class SidePanel extends Vue {
193
193
  const target = (event as FocusEvent).target as HTMLElement // The element receiving focus
194
194
  const sidePanelContainerEl = this.$refs['sidepanelContainer'] as HTMLElement
195
195
  const isFocusOutside = target && sidePanelContainerEl && !sidePanelContainerEl.contains(target)
196
- const hasCalendarClass = target
196
+ const hasCalendarClass = target?.classList
197
197
  && Array.from(target.classList).find(
198
198
  c => c === 'button-next-month' || c === 'button-previous-month' || c === 'day-item'
199
199
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pocketprep/ui-kit",
3
- "version": "3.8.4",
3
+ "version": "3.8.5",
4
4
  "description": "Pocket Prep UI Kit",
5
5
  "author": "pocketprep",
6
6
  "scripts": {