Closed lion9 closed 1 year ago
Scroll to a ListItem inside a ScrollContainer
Could you please share a minimal sample to reproduce the issue? You can edit https://jsbin.com/neyagus/edit?html,js,output, clone the edit, and share the new generated URL here.
Have you tried using the sap.m.ListBase#scrollToIndex
API instead? Or is it not applicable in your case?
scrollToIndex calls the same scrollToElement under the hood, with the same error being thrown
setTimeout(function() {
oScrollDelegate.scrollToElement(oItem.getDomRef(), null, [0, this._getStickyAreaHeight() * -1]);
return resolve();
}.bind(this), 0);
As per https://github.com/SAP/openui5/blob/master/CONTRIBUTING.md#requirements-for-a-bug-report, a URL to a sample is needed in which the issue can be reproduced. Here are some templates you could extend accordingly:
there was extra sap.m.App wrapper around an XML view, thus breaking the logic of child elements placement into the ScrollContainer
OpenUI5 version:
current
Browser/version (+device/version): Chrome
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible):
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem: Scroll to a ListItem inside a ScrollContainer
What is the expected result?
The ScrollContainer moves to the element
What happens instead?
Error is thrown because the framework tries to get a property of null