Skip to content

Commit

Permalink
fix(ally): removed todos
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarinkov committed Nov 22, 2024
1 parent 820b374 commit fc760b0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/core/src/utils/overlays/overlays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ export const getPresentedOverlay = (

const getPresentedOverlays = (doc: Document, overlayTag?: string): HTMLBalOverlayElement[] => {
return getOverlays(doc, overlayTag).filter(o => !isOverlayHidden(o))
// return getOverlays(doc, overlayTag);
}

const isOverlayHidden = (overlay: Element) => overlay.classList.contains('is-hidden') // TODO: is this the right class?
const isOverlayHidden = (overlay: Element) => overlay.classList.contains('is-hidden')

const trapKeyboardFocus = (ev: Event, doc: Document) => {
const lastOverlay = getPresentedOverlay(doc, 'bal-modal')
Expand Down Expand Up @@ -133,13 +132,6 @@ const trapKeyboardFocus = (ev: Event, doc: Document) => {
*/
const overlayRoot = lastOverlay

/* // TODO we currently do not know why this code is needed, it just works without this code
if (!overlayRoot.contains(target)) {
console.log("!overlayRoot.contains(target)", target, lastOverlay)
return;
}
*/

const overlayWrapper = overlayRoot.querySelector<HTMLElement>('.bal-modal__container')
if (!overlayWrapper) {
return
Expand Down

0 comments on commit fc760b0

Please sign in to comment.