Prakash Singh Gariya
Prakash Singh Gariya

Reputation: 31

How to Get Rid of Root View Scrollbar

I'm getting two scrollbars on my page. I'm using sap.m.App and then sap.m.Page. I want to disable scrolling on my App. I tried searching online but couldn't find anything relevant.

Two scrollbars in SAPUI5

Upvotes: 1

Views: 3009

Answers (2)

Boghyon Hoffmann
Boghyon Hoffmann

Reputation: 18044

The scrollbar (2) goes away if the root view (the view containing the <App> control) has the properties height="100%" and displayBlock="true" added.

Set (displayBlock) to true if the default display "inline-block" causes a vertical scrollbar with Views that are set to 100% height. (Source)

For example, in manifest.json:

{
  "sap.ui5": {
    "rootView": {
      "...": "...",
      "height": "100%",
      "displayBlock": true,
      "async": true
    }
  }
}

Or in the view definition itself:

<mvc:View xmlns:mvc="sap.ui.core.mvc" height="100%" displayBlock="true">
  <App xmlns="sap.m"> <!-- root view -->

Upvotes: 3

Jpsy
Jpsy

Reputation: 20852

Try adding an enableScrolling="false" attribute to the <Page> controls in your views:

<Page
  id="myPage"
  enableScrolling="false"
>

Upvotes: 0

Related Questions