ScrollTo option is not working correctly

0
Hi Team,   ScrollTo option in mendix is not working correctly at first time.   We are working on one of the applications where when we click on button it should redirect to center of different page at correct location where the class is mentioned.   It is redirecting to same page but different location where that class is not available.   If we refresh the page, it works properly.   Please refer below nanoflow.   1.Redirecting to another page (Show Page Activity) 2.Class applied to same page 3.Same class given to ScrollTo option.     Please let me know the solution if any.    
asked
1 answers
0

Hi Atul, 

 

While using the scroll to function, the only thing that actually needs the class is the element you want to scroll to. You mention that the page itself also has the same class, which should not be neccessary and might give issues. Make sure your class declaration is distinctive and is not used anywhere else on the page.

 

If this is the only scenario where you want your user to scroll to this specific part of the page, I think you currently have the correct solution and removing the class from your page might solve the issue.  

 

If you always want your users to be redirected to this part of the page, you could also try triggering the scroll-to functionality in a seperate nanoflow which you trigger on the page itself.

 

If those options don't work, it might also be valuable to share your page structure, your class declaration on the element you want to scroll to and in the nanoflow action so we can provide better help. The way you explain it now, it does sound like something hasn't refreshed correctly which is hard to tell without some examples.

 

 

answered