Hi, I’m embedding some Dashboard iFrames and I’m t...
# gooddata-platform
t
Hi, I’m embedding some Dashboard iFrames and I’m trying to figure out how to handle resizing the iFrame to avoid scrolling within the iFrame. I found the following JS example in the GoodData docs for listening for the events and resizing the iFrame.
Copy code
<script> 
window.addEventListener('message',function(event) {
		switch(event.data.gdc.event.name) {
			case 'resized':			
				var height = event.data.gdc.event.data.height;
			
				if (height) { 
					document.getElementById('frame').style.height = height + 'px'; 
				}	
				break;
		}
	},false);
</script>
However, the height for the last “resized” event always comes back as 0. Anyone have any thoughts on what might be happening here? Or is there a different approach for getting the height?
j
Hi Tyler. I am looking into it and will try to get you a good answer tomorrow.
t
Thank you!
j
Hi Tyler. I am also having trouble with getting accurate values from the ‘resized’ event. I’ve opened an internal ticket to get this addressed, as it doesn’t seem to be working properly at the moment.
In edit mode, the event returns correct-ish values, but not in view.
t
Thanks for digging into it and opening a ticket. I appreciate the help!
Probably unlikely but does your ticketing system have any way for me to sign up for updates or be notified of the status of the ticket?
j
Not the internal ones, no. I can update you here manually once there’s concrete info.
t
Sounds good; thank you!
🤝 1
Hi @Jan Rehanek, any update on this ticket?
j
Hello Tyler. It is indeed not working at the moment - it should get looked at within 1/2 weeks, assuming no tasks take higher priority.
t
Thanks for the update!
j
Hi Tyler. At the moment, we’re aiming for September 22nd for the next release (unless testing reveals something that would necessitate a delay).
t
Thank you for the update! Sorry for the slow reply!