Skip Navigation

[Resolved] Firefox scrolling problem with “This field is required” fields (Form)

This thread is resolved. Here is a description of the problem and solution.

Problem: When a required field is not filled in my Form upon submission, the browser scrolls to the top of the page but the field is hidden by a fixed header.

Solution: Add some CSS to influence the top scroll position of the document:

html {
    scroll-padding-top: 150px;
}
This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by anarT 3 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1863575
Capture2.JPG
Capture1.JPG

Tell us what you are trying to do?
After submitting a form (and not filling out all the required fields), Firefox is not scrolling top correctly. Instead of showing 3 required fields, the user sees only two required fields (when one is not scrolling manually after clicking the submit button).

Is there a similar example that we can see?
I added two screenshots. This is what I see after clicking the submit button.
Capture1.JPG = Firefox
Capture2.JPG = Chrome, Edge, Android etc.

As you see the problem appears only with Firefox. Any ideas how to fix that?

What is the link to your site?
hidden link

#1863917

It seems to be a side effect of how the Firefox browser scrolls to focused input fields, combined with the effect of a fixed menu positioned at the top of the page. I don't think it's necessarily Toolset-related, at first glance. I would try adding this CSS to your Form's CSS editor to see how it changes the behavior:

 
html {
    scroll-padding-top: 150px;
}

You may want to experiment with the 150 value to find something that works reasonably well across browsers and devices.

#1863977

My issue is resolved now. Thank you!
That works perfect.