Skip to content

Commit

Permalink
MWPW-144575: Fix for commerce modal height (adobecom#2014)
Browse files Browse the repository at this point in the history
There's a potential CSO lurking
  • Loading branch information
Axelcureno authored and yesil committed Mar 18, 2024
1 parent cfc3505 commit 7e2d363
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libs/blocks/modal/modal.merch.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ function reactToMessage({ data, source }) {

export function adjustStyles({ dialog, iframe }) {
const isAutoHeightAdjustment = /\/mini-plans\/.*mid=ft.*web=1/.test(iframe.src); // matches e.g. https://www.adobe.com/mini-plans/photoshop.html?mid=ft&web=1
console.log('isAutoHeightAdjustment', isAutoHeightAdjustment);
if (isAutoHeightAdjustment) {
dialog.classList.add('height-fit-content');
} else {
iframe.style.height = '100%';
iframe.style.height = '100vh';
}
}

Expand Down

0 comments on commit 7e2d363

Please sign in to comment.