Can we have 'Scroll To Top' feature in smartGWT?
Announcement
Collapse
No announcement yet.
X
-
scrollToTop() is a method available on any Canvas (see docs).
We don't recommend doing whole-page scrolling in enterprise applications. It's generally just not a good UE, as essentially all enterprise apps have certain controls that you want to keep on screen. Scrolling in sub-regions of the page makes much more sense.
If you insist on using full-page scrolling, then we recommend using a SmartClient component as the top-level container, so that you have SmartClient-managed scrolling instead of browser-managed scrolling. Browser-managed scrolling is full of bugs, such as, ending up with scrollbars on both axes when content shrinks, because some browsers fail to realize that the horizontal scrollbar is necessary only because there's a vertical scrollbar, but content would fit if both were removed.
Finally, if you ignore even those best practices, here's how you can scroll the browser window in GWT.
Comment
Comment