File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,18 @@ angular.module('ui.scroll', [])
381
381
bottomPadding . height ( bottomPaddingHeight + bottomPaddingHeightAdd ) ;
382
382
} ,
383
383
384
+ adjustPaddingUnbound ( updates ) {
385
+ if ( updates . prepended && updates . prepended . length )
386
+ topPadding . height ( topPadding . height ( ) + updates . estimatedPaddingIncrement ) ;
387
+ else
388
+ viewport . adjustPadding ( ) ;
389
+ } ,
390
+
391
+ adjustPaddingBound ( updates ) {
392
+ if ( updates . prepended && updates . prepended . length )
393
+ topPadding . height ( topPadding . height ( ) - updates . estimatedPaddingIncrement ) ;
394
+ } ,
395
+
384
396
adjustScrollTopAfterMinIndexSet ( topPaddingHeightOld ) {
385
397
// additional scrollTop adjustment in case of datasource.minIndex external set
386
398
if ( buffer . minIndexUser && buffer . minIndex > buffer . minIndexUser ) {
@@ -841,10 +853,13 @@ angular.module('ui.scroll', [])
841
853
function adjustBufferAfterFetch ( rid ) {
842
854
let updates = updateDOM ( ) ;
843
855
844
- viewport . adjustPadding ( ) ;
856
+ viewport . adjustPaddingUnbound ( updates ) ;
845
857
846
858
// We need the item bindings to be processed before we can do adjustment
847
859
$timeout ( ( ) => {
860
+
861
+ viewport . adjustPaddingBound ( updates ) ;
862
+
848
863
if ( isInvalid ( rid ) ) {
849
864
return ;
850
865
}
You can’t perform that action at this time.
0 commit comments