SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

Unable to scroll up when using sap.m.PullToRefresh and sap.m.ScrollContainer #1261

Closed MartyRed closed 7 years ago

MartyRed commented 7 years ago

OpenUI5 version: 1.42.6 Browser/version (+device/version): android/ sap.ui.Device:{"os":{"name":"Android","versionStr":"6.0.1","OS":{"WINDOWS":"win","MACINTOSH":"mac","LINUX":"linux","IOS":"iOS","ANDROID":"Android","BLACKBERRY":"bb","WINDOWS_PHONE":"winphone"},"version":6,"android":true},"browser":{"name":"cr","versionStr":"50","version":50,"mobile":true,"webkit":true,"webkitVersion":"537.36","BROWSER":{"INTERNET_EXPLORER":"ie","EDGE":"ed","FIREFOX":"ff","CHROME":"cr","SAFARI":"sf","ANDROID":"an"},"chrome":true},"support":{"touch":true,"pointer":false,"matchmedia":true,"matchmedialistener":true,"orientation":true,"retina":true,"websocket":true,"input":{"placeholder":true}},"media":{"RANGESETS":{"SAP_3STEPS":"3Step","SAP_4STEPS":"4Step","SAP_6STEPS":"6Step","SAP_STANDARD":"Std","SAP_STANDARD_EXTENDED":"StdExt"},"_predefinedRangeSets":{"3Step":{"points":[520,960],"unit":"px","name":"3Step","names":["S","M","L"]},"4Step":{"points":[520,760,960],"unit":"px","name":"4Step","names":["S","M","L","XL"]},"6Step":{"points":[241,400,541,768,960],"unit":"px","name":"6Step","names":["XS","S","M","L","XL","XXL"]},"Std":{"points":[600,1024],"unit":"px","name":"Std","names":["Phone","Tablet","Desktop"],"queries":[{"query":"all and (max-width:600px)","from":0,"to":600,"media":{}},{"query":"all and (min-width:600px) and (max-width:1024px)","from":600,"to":1024,"media":{}},{"query":"all and (min-width:1024px)","from":1024,"to":-1,"media":{}}],"timer":3,"currentquery":{"query":"all and (max-width:600px)","from":0,"to":600,"media":{}}},"StdExt":{"points":[600,1024,1440],"unit":"px","name":"StdExt","names":["Phone","Tablet","Desktop","LargeDesktop"],"queries":[{"query":"all and (max-width:600px)","from":0,"to":600,"media":{}},{"query":"all and (min-width:600px) and (max-width:1024px)","from":600,"to":1024,"media":{}},{"query":"all and (min-width:1024px) and (max-width:1440px)","from":1024,"to":1440,"media":{}},{"query":"all and (min-width:1440px)","from":1440,"to":-1,"media":{}}],"timer":4,"currentquery":{"query":"all and (max-width:600px)","from":0,"to":600,"media":{}}}}},"system":{"tablet":false,"phone":true,"desktop":false,"combi":false,"SYSTEMTYPE":{"TABLET":"tablet","PHONE":"phone","DESKTOP":"desktop","COMBI":"combi"}},"orientation":{"landscape":false,"portrait":true},"resize":{"width":360,"height":616}}

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible): can not be provided, source code deployed via cordova User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Have layout like <mvc:View controllerName="Home" xmlns:mvc="sap.ui.core.mvc" xmlns:l="sap.ui.layout" xmlns="sap.m" id="homeId" xmlns:u="sap.ui.unified">

    <u:Shell id="myShell" icon="images/logo.png">

</mvc:View>

  1. fill the scrollcontainer with sap.m.StandardTile in a way there is more than 20 in layout, so you have to scroll to see them all
  2. after a while instead of scrolling up, pull to refresh activates

What is the expected result? Pull to refresh reacts only when the layout is scrolled to top

What happens instead? Pull to refresh reacts whenever user tries to scroll up by touch.

ShtiliyanUzunov commented 7 years ago

Hi MartyRed,

Can you please provide us with a jsfiddle where you isolate the problem ? This will make the processing a lot easier for us. Thanks in advance.

Kind regards, Shtiliyan

MartyRed commented 7 years ago

Scrolling.zip Attached sample project ui5 sdk not included (takes to much space) version used 1.42.6 open in chrome on Android 4.4.+ scroll down to bottom, then try to scroll up - instead of scrolling pull to refresh is fired.

ShtiliyanUzunov commented 7 years ago

Issue confirmed. Internal ref: 1680340191

kineticjs commented 7 years ago

Hi Marty,

The pullToRefresh control should indeed be activated only when the page is scrolled to top. While currently it appears to be activated whenever the user tries to scroll up by touch.

On inspection I found that the app puts all content within a nested sap.m.ScrollContainer (with id="menuContent"). However:

https://jsbin.com/kewezoqimi/edit?output Here is a snippet that simply replaces the ScrollContainer with a non-scrollable container (a VBox in this case. (I also simplified it a bit to make it smaller)

Do you still have a use case that requires the use of a ScrollContainer (on top of the already scrollable page)? Please comment if that is the case,

Thanks, Diana

MartyRed commented 7 years ago

Hello, I’ll try suggested approach, however at first glance layout with VBOX seems to be mangled.

BR. Marty

From: Diana Pazheva notifications@github.com<mailto:notifications@github.com> Reply-To: SAP/openui5 reply@reply.github.com<mailto:reply@reply.github.com> Date: úterý 10. ledna 2017 15:58 To: SAP/openui5 openui5@noreply.github.com<mailto:openui5@noreply.github.com> Cc: "Rott, Martin" MRott@gk-software.com<mailto:MRott@gk-software.com>, Author author@noreply.github.com<mailto:author@noreply.github.com> Subject: Re: [SAP/openui5] Unable to scroll up when using sap.m.PullToRefresh and sap.m.ScrollContainer (#1261)

Hi Marty,

The pullToRefresh control should indeed be activated only when the page is scrolled to top. While currently it appears to be activated whenever the user tries to scroll up by touch.

On inspection I found that the app puts all content within a nested sap.m.ScrollContainer (with id="menuContent"). However:

https://jsbin.com/kewezoqimi/edit?output Here is a snippet that simply replaces the ScrollContainer with a non-scrollable container (a VBox in this case. (I also simplified it a bit to make it smaller)

Do you still have a use case that requires the use of a ScrollContainer (on top of the already scrollable page)? Please comment if that is the case,

Thanks, Diana

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/SAP/openui5/issues/1261#issuecomment-271596818, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AT74NcSBYJz5Ij1XMStZDa1q8D21B5qWks5rQ5yHgaJpZM4LODtU.