@@ -241,7 +241,9 @@ export class Modalize<FlatListItem = any, SectionListItem = any> extends React.C
241
241
242
242
private get modalizeContent ( ) : Animated . AnimatedProps < ViewStyle > {
243
243
const { modalHeight } = this . state ;
244
- const valueY = Animated . add ( this . dragY , this . reverseBeginScrollY ) ;
244
+ // We diff and get the negative value only. It sometimes go above 0 (e.g. 1.5) and creates the flickering on Modalize for a ms
245
+ const diffClamp = Animated . diffClamp ( this . reverseBeginScrollY , - screenHeight , 0 ) ;
246
+ const valueY = Animated . add ( this . dragY , diffClamp ) ;
245
247
246
248
return {
247
249
height : modalHeight ,
@@ -482,8 +484,9 @@ export class Modalize<FlatListItem = any, SectionListItem = any> extends React.C
482
484
const { timing } = closeAnimationConfig ! ;
483
485
const { lastSnap, modalHeight, overlay } = this . state ;
484
486
const { velocityY, translationY } = nativeEvent ;
487
+ const enableBounces = this . beginScrollYValue > 0 || translationY < 0 ;
485
488
486
- this . setState ( { enableBounces : this . beginScrollYValue > 0 || translationY < 0 } ) ;
489
+ this . setState ( { enableBounces } ) ;
487
490
488
491
if ( nativeEvent . oldState === State . ACTIVE ) {
489
492
const toValue = translationY - this . beginScrollYValue ;
@@ -620,7 +623,6 @@ export class Modalize<FlatListItem = any, SectionListItem = any> extends React.C
620
623
if ( panGestureAnimatedValue ) {
621
624
const diff = Math . abs ( translationY / ( this . initialComputedModalHeight - offset ) ) ;
622
625
const y = translationY < 0 ? diff : 1 - diff ;
623
-
624
626
let value : number ;
625
627
626
628
if ( this . modalPosition === 'initial' && translationY > 0 ) {
0 commit comments