Skip to content

Commit

Permalink
fix: indendation level of modals
Browse files Browse the repository at this point in the history
  • Loading branch information
kark committed May 7, 2024
1 parent 4870607 commit 8a947de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-lies-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@commercetools-frontend/application-components': patch
---

Use correct indentation level for modals rendered in portals container
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,7 @@ const PortalsContainer = forwardRef<TLayoutRefs, TPortalsContainerProps>(
if (node instanceof HTMLElement) {
const stackingLevel = index + 1;
node.dataset.level = String(stackingLevel);

const overlayNode = node.firstChild;
if (overlayNode instanceof HTMLElement) {
if (overlayNode.dataset.role === 'modal-overlay') {
indentationLevel += 1;
}
}

indentationLevel += 1;
nextStackingLevels.push({ stackingLevel, indentationLevel });
}
});
Expand Down

0 comments on commit 8a947de

Please sign in to comment.