Wix site not bringing form back to the top after page break in Safari

  • Profile Image
    Alicia_Coad
    Asked on February 02, 2021 at 03:53 AM

    Hi guys, 


    I am having an issue with our forms not going to the top of the next page (using page break) within our wix site. As some pages are longer than others users would have to scroll up to see anything, currently it looks like they just reach a white screen. 


    I have tried various forums which suggest things like adding the onload="self.scrollTo(0,0)” code into the main iframe instead of the online=“window.parent etc. code however this doesn’t solve it. Please see the code below. Here is the webpage: https://www.rocketlearn.co.uk/litesignup


    Thanks,

    Ali 


    Code: 


    <iframe id="JotFormIFrame-210263386222347" title="Lite Monthly Subscription (Main Subscription)" onload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="https://form.jotform.com/210263386222347" frameborder="0" style=" min-width: 100%; height:539px; border:none;" scrolling="no" > </iframe> <script type="text/javascript"> var ifr = document.getElementById("JotFormIFrame-210263386222347"); if (ifr) { var src = ifr.src; var iframeParams = []; if (window.location.href && window.location.href.indexOf("?") > -1) { iframeParams = iframeParams.concat(window.location.href.substr(window.location.href.indexOf("?") + 1).split('&')); } if (src && src.indexOf("?") > -1) { iframeParams = iframeParams.concat(src.substr(src.indexOf("?") + 1).split("&")); src = src.substr(0, src.indexOf("?")) } iframeParams.push("isIframeEmbed=1"); ifr.src = src + "?" + iframeParams.join('&'); } window.handleIFrameMessage = function(e) { if (typeof e.data === 'object') { return; } var args = e.data.split(":"); if (args.length > 2) { iframe = document.getElementById("JotFormIFrame-" + args[(args.length - 1)]); } else { iframe = document.getElementById("JotFormIFrame"); } if (!iframe) { return; } switch (args[0]) { case "scrollIntoView": iframe.scrollIntoView(); break; case "setHeight": iframe.style.height = args[1] + "px"; break; case "collapseErrorPage": if (iframe.clientHeight > window.innerHeight) { iframe.style.height = window.innerHeight + "px"; } break; case "reloadPage": window.location.reload(); break; case "loadScript": var src = args[1]; if (args.length > 3) { src = args[1] + ':' + args[2]; } var script = document.createElement('script'); script.src = src; script.type = 'text/javascript'; document.body.appendChild(script); break; case "exitFullscreen": if (window.document.exitFullscreen) window.document.exitFullscreen(); else if (window.document.mozCancelFullScreen) window.document.mozCancelFullScreen(); else if (window.document.mozCancelFullscreen) window.document.mozCancelFullScreen(); else if (window.document.webkitExitFullscreen) window.document.webkitExitFullscreen(); else if (window.document.msExitFullscreen) window.document.msExitFullscreen(); break; } var isJotForm = (e.origin.indexOf("jotform") > -1) ? true : false; if(isJotForm && "contentWindow" in iframe && "postMessage" in iframe.contentWindow) { var urls = {"docurl":encodeURIComponent(document.URL),"referrer":encodeURIComponent(document.referrer)}; iframe.contentWindow.postMessage(JSON.stringify({"type":"urls","value":urls}), "*"); } }; if (window.addEventListener) { window.addEventListener("message", handleIFrameMessage, false); } else if (window.attachEvent) { window.attachEvent("onmessage", handleIFrameMessage); } </script>


  • Profile Image
    Niko_N
    Answered on February 02, 2021 at 05:41 AM

    Greetings,

    Thanks for reaching out to us!

    I've checked your form, and it's correctly displayed when navigated to the next pages:

    1612262237_60192b5d6bfd8_

    Could you please let us know if you are referring to something else?

    Meanwhile, you may also check our other embed options:

    Which Form Embed Code Should I Use

    Thank you!


  • Profile Image
    Alicia_Coad
    Answered on February 02, 2021 at 06:14 AM

    Hey,

    On our end this looks different (tried using Safari and Chrome) and users have to scroll up after pressing next, we would really like to not have the internal scroll as well as otherwise viewers have two scroll options (one for the page itself and the other for the form if that makes sense). Thanks! :)

    1612264417_601933e1770f2_f7b005f70141dcc

  • Profile Image
    Patrick_R
    Answered on February 02, 2021 at 07:37 AM

    Hello Ali! The issue that you're facing is not replicable on Chrome and FireFox but it can be replicated on Safari.

    I am not sure if this is our issue our Wix issue but we'll still escalate this to the developers to bring this to their notice.

    However, our official embed instructions for the Wix site asks simply to use the web address instead of the iFrame code.

    Please give this method a try; in case it doesn't work, let us know so that we can escalate.

    Thank you!

  • Profile Image
    Alicia_Coad
    Answered on February 02, 2021 at 08:01 AM

    Hey,

    Thanks for the help guys, issue seems to be resolved in other browsers but not working in Safari. I have added the site via the official instructions for Wix and still the issue persists on Safari. If you could escalate it to the developers that would be great as its been driving me crazy :P

    Thanks again!

  • Profile Image
    Nik_M
    Answered on February 02, 2021 at 09:16 AM

    I'll escalate this issue to our developers. If there is any update, we will inform you here.