jquery-smartwizard icon indicating copy to clipboard operation
jquery-smartwizard copied to clipboard

Wizard Scrolls off top of screen on Hard Refresh

Open marcodeluca opened this issue 7 years ago • 4 comments

Working off your dist example (index.html) to recreate the issue:

Add a bunch of content BELOW your wizard form, enough to force a scroll bar. Now do a hard refresh. The page jumps to the #step hashmark and the wizard itself looks like its about maybe 200 pixels off the top of the screen.

Happens in FIREFOX browser. So probably an issue with Firefox and not the script?

marcodeluca avatar Apr 12 '18 16:04 marcodeluca

I am facing the similar issue. Also, in my case when I click next / previous the page jumps to #step-1 making the steps title scrolled off the screen.

It is happening in both Chrome and Firefox

I am using:

  • bootstrap-3.3.7
  • jquery-2.1.1

dani0332 avatar Apr 26 '18 21:04 dani0332

Horrible fix would be to add this in the _showStep: function(idx) (line 332):

setTimeout(function() {
    window.scrollTo(0, 0);
}, 1);

And don't forget to add this function on your $(document).ready(function() if the user comes from the url directly (or reload page)

ligoo avatar Jun 02 '18 15:06 ligoo

Same thing happens for me on firefox and chrome as well. any other solutions than scrolling back manually?

MartinP7r avatar Oct 30 '19 01:10 MartinP7r

Having the same issue when the content in 1 step is more than the height of my screen. You can simulate it too when you go here and click for ex. on the tab "Ajax Contents" http://techlaboratory.net/smartwizard/demo/basic

any solutions yet?

vlatro avatar Mar 04 '20 19:03 vlatro