zoid icon indicating copy to clipboard operation
zoid copied to clipboard

iframe height issue

Open sambeauvois opened this issue 4 years ago • 3 comments

Hello, I'm using the last tag of zoid and I think I'm using it correctly.

I took the code of the zoid.iframe.min.js file and copied it in a file In this file I added this code

var CarWidget = zoid.create({
    tag: 'carwidget',
    url: '/Widgets/Car',
   
	autoResize: {
    width: false,
    height: true
},

dimensions: {
    height: '100%',
    width: '100%',
  },
	queryParam: true,
	props: {
		carValueVATIncluded: {
			type: 'number',
			required: false, 
			queryParam: true 
		},
		source: {
			type: 'string',
			required: false,
			queryParam: true 
		}
	}
});

I referenced this file in my widget page and in my "parent page"

in my parent page I added

<div id="widgetcontainer"></div>

<script>
CarWidget({
    carValueVATIncluded:60000,
	source:'sam'
}).render('#widgetcontainer');
</script>

My problem is that I always have a vertical scrollbar (tested in chrome, firefox and edge)

image

I see that there is a height on my rendered component image

but it's 38pixels too small to make the scrollbar disapears.

I have the exact same result if I set the height dimension in pixels

dimensions: {
    height: '500px',
    width: '100%',
  },

Is this a zoid issue or am I using it wrong ?

sambeauvois avatar Oct 20 '20 16:10 sambeauvois

I just noticed that if I add the css rule

   html, body {
            overflow: hidden;
        }
        body {
            height: 100%;
            width: 100%;
        }

In my child page (in my widget) It's working with a small issue (my select is not completely visible) image

EDIT :: it's working if I use

   body {
            height: 100%;
            width: 100%;
 margin: 0;
        }

or if I use a css reset (if I use the css of bootstrap it's working fine)

I think this should be part of the documentation

sambeauvois avatar Oct 21 '20 13:10 sambeauvois

@sambeauvois Sorry no one has had a chance to respond to this. Do you have a link to this demo? I am curious to how the container is styled and any containers around it.

mnicpt avatar Jan 07 '21 15:01 mnicpt

@sambeauvois Were you able to resolve?

mnicpt avatar Jun 21 '21 14:06 mnicpt