Menu icon Foundation
Modal resets position of page in browser

I looked for something similar in other posts, but found nothing. 

I hope I am not asking a question that has been answered before.  So, I have a site, https://www.rockymountainhondadealers.com/2018-honda-accord, that has a modal window with a form in it.  There are several places to open the  same modal on the page; one at the top of the page, and one in each of the expandable (accordion) trim level sections towards the bottom of the page. 

The issue that I am having is that when someone is down the page and clicks to open the form, it take the visitor back to the top of the page, as if they had refreshed the page, and they lose their place on the page.  I have looked through the docs and find no setting or control for whether the page is reset.  I have looked at the examples of the open and close modal functions, and it does not happen there at all. 

I believe the site is running Foundation 6.2.3.  Does anyone have an idea on how I can fix this?

modaltop-of-page6.2.3

I looked for something similar in other posts, but found nothing. 

I hope I am not asking a question that has been answered before.  So, I have a site, https://www.rockymountainhondadealers.com/2018-honda-accord, that has a modal window with a form in it.  There are several places to open the  same modal on the page; one at the top of the page, and one in each of the expandable (accordion) trim level sections towards the bottom of the page. 

The issue that I am having is that when someone is down the page and clicks to open the form, it take the visitor back to the top of the page, as if they had refreshed the page, and they lose their place on the page.  I have looked through the docs and find no setting or control for whether the page is reset.  I have looked at the examples of the open and close modal functions, and it does not happen there at all. 

I believe the site is running Foundation 6.2.3.  Does anyone have an idea on how I can fix this?

melisa ann over 1 year ago

nice

Michael Barthel over 1 year ago

Does anyone have helpful ideas?  Why am I getting responses like "Hello guys..." and "nice"?

Roy Six over 1 year ago

Hi Michael,

This was an issue brought up before in the older 6.x versions (although the solutions were usually varied). For your site though, when I test the "Schedule a Test Drive" modal, removing the "position: fixed !important;" being applied in the below CSS no longer makes the page jump up top for me (on Chrome at least). Although, I'm guessing you had this extra little bit of CSS in there to solve a different problem:

body.is-reveal-open {
    position: fixed !important;
    width: 100%;
}

Hope this helps point you in the right direction,

Roy