Mobile embed: requirement to login appears in the middle

Started by Paulius Bakutis

Markus Huber

Hi Paulius!

Sorry it took a little longer. Since some of our users integrate our polls screen filling, we couldn't easily rebuild it.

But now there is the option to deactivate the centered overlay. The iFrame will then automatically be resized to the size of the overlay. This requires the iFrameResize() Script.

You need to add &embed_options[disable_remote_overlay]=1 to your poll link.
Take a look at: https://pollunit.com/tutorials/embed_poll (Almost at the end of the tutorial)

When the iframe will be loaded you can bind functions on this event. For example you could do something like this with jQuery to scroll your page to the iframe when the iFrame contents change.

$('iframe').load(function() {
  $('html, body').animate({ scrollTop: ($('iframe').offset().top) }, 'slow');
});

Another solution would be to set the height of the iFrame to 100vh. vh units representing a percentage of the current viewport height. By setting the iFrame via css to 100vh the iframe always fit to the users display. As stated before, many of our clients use embedded polls screen filling. The CSS would look like this:

iframe {
  width: 100vw;
  height: 100vh;
}

Your page has a fixed header. So you could also substract the header height from the 100vh.

iframe {
  width: 100vw;
  height: 100vh;
  height: calc(100vh - *YourPersonalHeaderHeightInPx*);
}

I hope this will help you!