Skip to Content
0

Remove scrolling from body / html (window) and instead place it as ScrollContainer

Apr 10, 2017 at 10:30 AM

269

avatar image
Former Member

Hi,

I need to understand how to disable window scrollbar and add a sap.m.ScrollContainer to page / XMLView.

Without a scrollbar, user will not know that scrolling mouse will do a page up/ page down since what he sees is just a window scrollbar (which doesn't cover entire height).

So I thought of using a ScrollContainer but it enables dual scrolling on screen. I added CSS - "overflow: hidden" to body / html tags of index.html but did not get the desired outcome.

Please suggest best way out.

Regards,

Janani

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Janani Rajagopalan Apr 18, 2017 at 07:37 AM
0

Hi,

I deployed the app (developed in WEBIDE) to Fiori launchpad and there is only one scroll bar i.e. page scrollbar which is in sync to my mouse scrolling. Issue solved. For anyone facing similar issue, please deploy app and check in Launchpad to validate existence of issue. Thanks Akhilesh for the clarification.

Regards,

Janani

Share
10 |10000 characters needed characters left characters exceeded
Srikanth KV Apr 10, 2017 at 04:13 PM
0

set your app height to fixed..this will remove window scrolling.

If the app or any of the container size is greater than height of the window then window scrolling will appear.

Identify the container using F12 developer tools that is having height more than window height

Share
10 |10000 characters needed characters left characters exceeded
Akhilesh Upadhyay Apr 10, 2017 at 07:35 PM
0

if you are using sap.m in sapui5 app you should not see browser(window) scrollbars.

  • if you are using sap.m.Page, then there is one property of page is enableScrolling which is by default true, if you really wants to hide it then you can set it to false, and introduce ScrollContainer control as per your requirement.
  • if your are going to use ScrollContainer, then you need to set its height dynamically as per current browser height to make it responsive.

I might not understood your requirement correctly, so if above point does not helps you then share screenshot of your screen for better understanding.

Share
10 |10000 characters needed characters left characters exceeded