Skip to content

Commit

Permalink
Merge pull request #1500 from KWizCom/bug-fixes
Browse files Browse the repository at this point in the history
fix image plugin z-index calc
  • Loading branch information
juliaroldi authored Jan 12, 2023
2 parents 98a46ea + ea977bd commit ab6bbee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export default function getLatestZIndex(editorDiv: HTMLElement) {
let child: HTMLElement | null = editorDiv;
let zIndex = 0;
while (child && getTagOfNode(child) !== 'BODY') {
const childZIndex = child.style.zIndex || getComputedStyle(child).zIndex;
const childZIndex = parseInt(child.style.zIndex || getComputedStyle(child).zIndex, 10);
if (childZIndex) {
zIndex = parseInt(child.style.zIndex);
zIndex = Math.max(zIndex, childZIndex);
}
child = child.parentElement;
}
Expand Down

0 comments on commit ab6bbee

Please sign in to comment.