Different form behavior in Chrome and Firefox | Community
Skip to main content
December 24, 2015
Solved

Different form behavior in Chrome and Firefox

  • December 24, 2015
  • 3 replies
  • 3423 views

Hi,

On the landing page : http://pages.videojet.com/PPC-Brand-Brand-AB-TEST-Variation-1.html

>On chrome :  the forms are diplayed on the top of the page and centered.

http://www.videojet.com/content/dam/Countries/France/Marketo-BH/chrome-form.jpg

>On firefox: the forms are displayed anywhere on the page.

http://www.videojet.com/content/dam/Countries/France/Marketo-BH/FF-form.jpg

I would like to have the same behavior on form appearance for all browsers.

Also; do you know a JS to not make the form being displayed on top of the page ? So the user is not redirected to the top of the page.

thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

OK, here you go:

MktoForms2.whenReady(function(form){

  window.dispatchEvent(new UIEvent('resize'));

});

This will compensate for a bug in the Marketo modal rendering where it miscalculates the height as < 0.

3 replies

December 24, 2015

I checked this out and cannot see the problem, did you fix it?

SanfordWhiteman
Level 10
December 24, 2015

I see it as in Benoit's screenshot.  What version of FF are you using?

SanfordWhiteman
Level 10
December 24, 2015

Benoit, I see the exact bug in forms2.js that's causing this, but I haven't found a workaround yet (aside from replacing the whole script with an updated version, which is obviously not recommended).

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
December 24, 2015

OK, here you go:

MktoForms2.whenReady(function(form){

  window.dispatchEvent(new UIEvent('resize'));

});

This will compensate for a bug in the Marketo modal rendering where it miscalculates the height as < 0.

December 25, 2015

Great ! thank you @Sanford Whiteman​

as always, perfect !