Commit 945cee8e authored by François-Xavier Lebastard's avatar François-Xavier Lebastard
Browse files

Merge branch 'bugfix/UNOTOPLYS-71_scrolltop' into 'develop'

UNOTOPLYS-71 fix(front) : scroll en haut de l'écran au changement de Screen

See merge request !26
parents 0d9e8d08 77148e36
......@@ -76,11 +76,16 @@ export default class FrontFormService {
this.store.commit('resetAnswers');
this.store.dispatch('updateMeta', {titleForm: screen.titleForm, titleScreen: screen.title, descriptionForm: screen.descriptionForm});
this.store.commit('currentScreen', screen);
this.scrollScreenTop();
this.refreshRoute();
resolve(true);
}
public refreshRoute(): void {
private scrollScreenTop() {
window.scrollTo(0, 0);
}
private refreshRoute(): void {
const referenceForm = this.store.getters.referenceForm;
const referenceScreen = this.store.getters.currentScreen.reference;
const currentRoute = this.router.currentRoute;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment