VinceG / twitter-bootstrap-wizard

This twitter bootstrap plugin builds a wizard out of a formatter tabbable structure. It allows to build a wizard functionality using buttons to go through the different wizard steps and using events allows to hook into each step individually.
MIT License
1.39k stars 676 forks source link

Navigation buttons reset scrollbar position to top of page #102

Closed vercotux closed 10 years ago

vercotux commented 10 years ago

When Previous/Next/First/Last buttons are clicked, the scroll position is thrown to the absolute top of the web page. This is very problematic especialy to mobile users.

VinceG commented 10 years ago

@vercotux can you share a code? if this is an tag you are using make sure to set the href to something like javascript:; and not # .

vercotux commented 10 years ago

It even happens in your own example: http://vadimg.com/twitter-bootstrap-wizard-example/examples/basic-formvalidation.html

VinceG commented 10 years ago

@vercotux yes, that is correct. that is because of the href='#' if you change that to href="javascript:;" it won't happen. as i described above.

vercotux commented 10 years ago

That is a very bad workaround. A proper solution would be to dynamically change the href values of next/previous buttons to correctly link to the corresponding tab.

VinceG commented 10 years ago

@vercotux feel free to contribute this into the core.