Question T11153
Visible to All Users

Cannot scroll in survey - React

created 2 years ago

Hi,

I built a basic survey in React, and it looks fine, but I am not able to scroll at all in the page.

I tried wrapping the survey inside of a div and enabling scroll on the div, but that didn't help either.

Please help. I have to deploy this app ASAP.

Show previous comments (5)

    Hello,
    Thank you for the clarification. I should say that we haven't tested how SurveyJS Form Library would perform with Next.JS. Theoretically, disabling server-side rendering should help.

    JavaScript
    const SSR = typeof window === "undefined"; function SurveyComponent() { const survey = new Model(json); if (!SSR) return <Survey model={survey} />; else return <div></div>; }

    Example.
    Please let me know if the above code changes anything.

      Hi Jane,

      I already disabled SSR and I'm facing this issue.

      One thing that I have noticed is that after removing the styling by commenting the StylesManager.applyTheme("defaultV2"); line, I can see the scrollbar. Even though it's in a small section of the page, the scrollbar works. Please check attached gif to see the change.

        Hello,
        Thank you for sharing this video. Perhaps, CSS styles defined at your application level affect survey styling. I would suggest that you research the survey styles using browser developer tools. If you require assistance, please share a reproducible demo for research.