Closed
Description
After hard reload, the ui-scroll fetching mechanism breaks down: shouldLoadTop/shouldLoadBottom methods return false due to viewport.bottomVisiblePos()
returns invalid value.
Per AngularJS Automatic Initialization doc:
AngularJS initializes automatically upon DOMContentLoaded event or when the angular.js script is evaluated if at that time document.readyState is set to 'complete'.
So if I have some class-style on the viewport (which provides necessary height to the viewport and which is comming from external resource), then the initialization of the app and initialization of the ui-scroll may occure before that external resource is downloaded and applied.
Possible workarounds:
- make soft reload (without resources cache cleaning)
- bootstrap the app manually in appropriate time (angular.bootstrap)
- postpone ui-scroll render via ng-if and setTimeout/$timeout
- inline height css property:
<div ui-scroll-viewport style="height: 300px">
Metadata
Metadata
Assignees
Labels
No labels