Working on a mobile tab bar and want it resemble a native app as much as possible. When changing tabs, I need the page to scroll to 0 but without animation. The built in one animates scroll, but I need it to be instant.
Any tips?
Working on a mobile tab bar and want it resemble a native app as much as possible. When changing tabs, I need the page to scroll to 0 but without animation. The built in one animates scroll, but I need it to be instant.
Any tips?
That might do the trick itselfâŚnot sure what you are really looking for in terms of no animation
Here is a link that you may need to investigate further if my above screen shot doesnât do exactly what you want
Thanks for this. No animation = instant. Since itâs a single-page app with tabs, scrolling down the page affects all tabs. When switching tabs, Iâd love it to appear already at the top of that tab.
Iâm trying to use your expression but it wont allow me to use the page itself as a parameter (which is the thing thatâs scrolling). Any ideas?
Been looking for a way to do this as well. Parts of the app is single page, where I need it to âloadâ instantly. But the scroll animation makes it a bit confusing from a user perspective, where what looks like a new page to them starts scrolling.
So you would need a âjumpâ to position instead of âscrollâ to position. But Iâm not sure thatâs even possible?
I guess it is,
I donât know why it wouldnât be working for the page. The part that says âwindow.scrollToâ the window is the page as far as I know.
In my app I have the page stop scrolling when I open my sidebar navigation. This causes the page to scroll up no matter where on the page the user is currently at when the open the side bar navigation.
When the user would close the side bar navigation, without this javascript the page would remain at the top. When I added this javascript the page would scroll down to the position used in the dynamic data.
What you might want to do is set the expression to
window.scrollTo(0,0)
Are you using the router plugin or the browser plugin to change the URL?
Just reading what you wrote makes me feel like you are not setting up the single page portions with groups that are aligned vertically to each other with collapse height when hidden selected so that as the user navigates on the single page, the groups âhideâ and collapse bringing the group that should be displayed to the top of the page immediately.
One way to enable the user to still use the browser back and forward buttons in that set up to navigate beyond just using on page tabs or buttons, is to use the router plugin or the browser pluginâŚthey can change the URL and allow the browser buttons to be used to navigate between the changed URLs as changed from the page.
No worries. Just mark the reply as the solution so other users will know in the future the thread as a solution to help when they may be searching for the same issue. It shows next to the title in searches if it is solved or not, making the tedious task of sifting and sorting through threads a bit easier to find solutions.
Rather than boring you with an explanation of the page, I wasnât able to set it up with the stacked groups in a good way in one place, so I ended up with scrolling to position. But your javascript solved the animated scroll issue. so all good, and thank you At some point I might re-design the page in a way where stacked groups works, since that would make it more consistent throughout the app, and also better in general.
I didnât know about the router plugin or browser plugin, that sounds great tho, as I was looking for a way to enable browser back functionality. Will have a look at that, thank you for pointing that out!
I think the router plugin is inherit in that ability. The browser plugin gives two options to change the URL, I think it is âreplaceâ and the other is âmodifyââŚI forget which one gives the ability to use browser navigation, while the other doesnât.
The downfall of browser plugin is that the URL paths as a list does not register these changes and neither does the router plugin so you canât use URL paths as a list item numbers for setting conditionals.
However, the router plugin stores the paths and parameters itself, so you can use its values for conditionals.
This topic was automatically closed after 70 days. New replies are no longer allowed.