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', [])
381381 bottomPadding . height ( bottomPaddingHeight + bottomPaddingHeightAdd ) ;
382382 } ,
383383
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+
384396 adjustScrollTopAfterMinIndexSet ( topPaddingHeightOld ) {
385397 // additional scrollTop adjustment in case of datasource.minIndex external set
386398 if ( buffer . minIndexUser && buffer . minIndex > buffer . minIndexUser ) {
@@ -841,10 +853,13 @@ angular.module('ui.scroll', [])
841853 function adjustBufferAfterFetch ( rid ) {
842854 let updates = updateDOM ( ) ;
843855
844- viewport . adjustPadding ( ) ;
856+ viewport . adjustPaddingUnbound ( updates ) ;
845857
846858 // We need the item bindings to be processed before we can do adjustment
847859 $timeout ( ( ) => {
860+
861+ viewport . adjustPaddingBound ( updates ) ;
862+
848863 if ( isInvalid ( rid ) ) {
849864 return ;
850865 }
You can’t perform that action at this time.
0 commit comments