InputListItem with Switch, Slider and Label layout broken on small screens
OpenUI5 version:
1.42.3
Browser/version (+device/version):
iOS 10, Google Chrome (with Device selection)
Any other tested browsers/devices(OK/FAIL):
none
URL (minimal example if possible):
none
User/password (if required and possible - do not post any confidential information here):
none
Steps to reproduce the problem:
- The following layout is broken for the switch, slider and label.

- When run on a bigger screen the layout looks like this:

The fragment to generate the layout looks like this:
`<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:commons="sap.ui.commons">
<Panel expandable="true" expanded="false" headerText="Einstellungen"
width="auto" class="sapUiResponsiveMargin" id="switchPanel">
<content>
<List visible="false" id="switchList"
items="{
path: 'switches>/switchStatuses'
}">
<items>
<InputListItem label="{switches>name}" description="{switches>name}"
icon="sap-icon://lightbulb" iconDensityAware="false" iconInset="false">
<Switch state="{switches>switchState}" change="handleSwitchChange" />
</InputListItem>
</items>
<headerToolbar>
<Toolbar>
<Title text="Schalter" level="H2" />
<ToolbarSpacer />
</Toolbar>
</headerToolbar>
</List>
<List visible="false" id="windowBlinds"
items="{
path: 'windowBlinds>/windowBlinds'
}">
<items>
<InputListItem label="{windowBlinds>name}"
description="{windowBlinds>name}" icon="sap-icon://lightbulb"
iconDensityAware="false" iconInset="false">
<Slider min="0" max="99" value="{windowBlinds>currentValue}"
width="100px" change="handleBlindChange" />
<Label text="{windowBlinds>currentValue}"></Label>
</InputListItem>
</items>
<headerToolbar>
<Toolbar>
<Title text="Rolläden" level="H2" />
<ToolbarSpacer />
</Toolbar>
</headerToolbar>
</List>
<List visible="false" id="lights" items="{
path: 'lights>/'
}">
<items>
<InputListItem label="{lights>name}" description="{lights>name}"
icon="sap-icon://lightbulb" iconDensityAware="false" iconInset="false">
<Switch state="{= ${lights>brightnessLevel}>0}" change="handleLightSwitchChange" />
<Slider min="0" max="99" value="{lights>brightnessLevel}"
width="100px" change="handleLightChange" />
<Label text="{lights>brightnessLevel}"></Label>
</InputListItem>
</items>
<headerToolbar>
<Toolbar>
<Title text="Licht" level="H2" />
<ToolbarSpacer />
</Toolbar>
</headerToolbar>
</List>
<List visible="false" id="thermostats"
items="{
path: 'thermostats>/switchStatuses'
}">
<items>
<InputListItem label="{thermostats>name}"
description="{thermostats>name}" icon="sap-icon://lightbulb"
iconDensityAware="false" iconInset="false">
<Label text="{thermostats>latestStatus}"></Label>
<Slider min="16" max="28" step="0.5"
value="{thermostats>latestStatus}" width="100px"
change="handleThermostatChange" progress="true"
showHandleTooltip="true" />
</InputListItem>
</items>
<headerToolbar>
<Toolbar>
<Title text="Thermostat" level="H2" />
<ToolbarSpacer />
</Toolbar>
</headerToolbar>
</List>
<!-- <commons:ColorPicker id="lampe" name="Wohnzimmer" change="handleColorPickerChange"
/> -->
</content>
</Panel>
<Panel expandable="true" expanded="false" headerText="Historic Data"
width="auto" class="sapUiResponsiveMargin" expand="expandHistoricData">
<content>
<core:HTML
content="<div id='chart'>
<svg style='height:300px; width:100%;'></svg>
</div>"></core:HTML>
</content>
<beginButton>
<Button text="Schliessen" press="dialogClose" />
</beginButton>
</Dialog>
</core:FragmentDefinition>`
It also seems to be a bit dependend on the word wrapping of the item label "Esstisch".
What is the expected result?
One idea what should happen is, that the button should be above the slider and the whole row should be adjusted in height.
What happens instead?
Layout is broken, elements overlap other rows.
Any other information? (attach screenshot if possible)
see above
Hi Christoph,
I tried to reproduce the issue (including within dialog context), but still the problem does not show. Just a Button on jsbin.com
It looks like there are further conditions that I could not see in the code fragment you provided. Is there a direct link to a setup that can be inspected? Or would you edit the jbin sample above to show the problem?
Thanks, Diana
JS Bin sample link: https://jsbin.com/dupogetepe/edit?html,output
Hi Diana,
the example code on JSBIN shows for me the same issue, if I switch to the Device Mode of Chrome:

and then to an Iphone 5 with 320x568px.
Kind Regards, Christoph
Hi Christoph,
I see that indeed this happens when you switch to the Device Mode of Chrome (and device is Iphone 5 with 320x568px). Upon refresh the layout is OK again. The Chrome browser does not display anymore a warning to refresh the browser when you switch between device and desktop mode, but looks like that was the actual problem. (Because the wrong layout does not occur when you load the sample https://jsbin.com/dupogetepe/edit?output while Device Mode with Iphone 5 with 320x568px is already enabled).
I also tested on a real iPhone5s device and the problem does not occur there as well.
Therefore, do we agree to consider this as false positive :-) ?
Best Regards, Diana
This is an actual screenshot from my iPhone 5c:
As far as I see it, the Label in your screenshot is not shortened (no ...). That seems to trigger the layout issue. Shorter Label = no issue, longer label = issue.
So I currently do not agree with the false positive. ;-)
Kind Regards, Christoph
Hi Christoph,
This is correct. I opened an internal ticket for this issue (#1680262262 for internal reference).
Thanks, Diana