Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if adUrl is passed to renderAd rendered iframe is not visibile #10734

Closed
pez46 opened this issue Nov 16, 2023 · 2 comments
Closed

if adUrl is passed to renderAd rendered iframe is not visibile #10734

pez46 opened this issue Nov 16, 2023 · 2 comments
Assignees
Labels

Comments

@pez46
Copy link

pez46 commented Nov 16, 2023

Type of issue

question

Description

if adUrl is passed instead of ad in renderAd() function, it calls createInvisibleIframe which has style.width = 0 and style.height = 0,
so even if width and height attribute is set correctly the style ovverride these properties and iframe remain not visible.
is this the normal behaviour?

image

Steps to reproduce

Test page

Expected results

I think that after inserting iframe in document it should be updated with correct style

Actual results

Platform details

prebid8.23.0
nexx360 adapter with test ssP

Other information

@pez46 pez46 changed the title if adUrl is passed to renderAd iframe result is not visibile if adUrl is passed to renderAd rendered iframe is not visibile Nov 16, 2023
@pez46
Copy link
Author

pez46 commented Nov 16, 2023

this is the actual solution, but i think it is a bad workaround:

pbjs.onEvent('adRenderSucceeded', (params) => {
   console.log(params);
   const GframeDocument = params.doc;
   const iframeBadStyle = GframeDocument.querySelector("iframe");
   console.log(iframeBadStyle);
				
   iframeBadStyle.style.width = ""+params.bid.width+"px";
   iframeBadStyle.style.height = ""+params.bid.height+"px";			
});

@dgirardi
Copy link
Collaborator

Closing this with #9647

@github-project-automation github-project-automation bot moved this from PR submitted to Done in Prebid.js Tactical Issues table Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

3 participants