Menu icon Foundation
Page jumps to top on reveal toggle

I'm using reveal to append an image onto a div when I open an foundation tab. What happens is, when I the div that the images are getting appended to is not within the visible part of the viewport the windows jumps to the top when I toggle the reveal. How can I stop this behaviour? I tried the change the css when the body has the class .is-reveal-open.

body.is-reveal-open{
  overflow:visible!important;
}

This did not help. I needed the page to be able to scroll when the reveal was open and I also thought this would stop the jumping to the top issue, i don't use this as a traditional modal. 

Any insights are much appreciated!

revealtogglescrollappend

I'm using reveal to append an image onto a div when I open an foundation tab. What happens is, when I the div that the images are getting appended to is not within the visible part of the viewport the windows jumps to the top when I toggle the reveal. How can I stop this behaviour? I tried the change the css when the body has the class .is-reveal-open.

body.is-reveal-open{
  overflow:visible!important;
}

This did not help. I needed the page to be able to scroll when the reveal was open and I also thought this would stop the jumping to the top issue, i don't use this as a traditional modal. 

Any insights are much appreciated!

This post has been closed. No new replies can be added.

Tim 10 days ago

I ended my headaches over this and tried a different solution. Clearly I was using reveal for the wrong purposes. Fixed it with some custom jQuery.