@@ -604,7 +604,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
604604 // As a result we cannot unconditionally measure with EXACTLY the current measured height
605605 const childHeightMeasureSpec = FlexboxLayout . getChildMeasureSpec ( this . _currentHeightMeasureSpec ,
606606 lp . effectivePaddingTop + lp . effectivePaddingBottom + lp . effectiveMarginTop
607- + lp . effectiveMarginBottom , lp . effectiveHeight < 0 ? WRAP_CONTENT : lp . effectiveHeight ) ;
607+ + lp . effectiveMarginBottom , lp . effectiveHeight < 0 ? WRAP_CONTENT : lp . effectiveHeight ) ;
608608
609609 child . measure ( childWidthMeasureSpec , childHeightMeasureSpec ) ;
610610 child . effectiveMinWidth = minWidth ;
@@ -820,7 +820,17 @@ export class FlexboxLayout extends FlexboxLayoutBase {
820820 private _stretchViewVertically ( view : View , crossSize : number ) {
821821 let newHeight = crossSize - view . effectiveMarginTop - view . effectiveMarginBottom ;
822822 newHeight = Math . max ( newHeight , 0 ) ;
823- view . measure ( makeMeasureSpec ( view . getMeasuredWidth ( ) , EXACTLY ) , makeMeasureSpec ( newHeight , EXACTLY ) ) ;
823+ let originalMeasuredWidth = view . getMeasuredWidth ( ) ;
824+ let childWidthMeasureSpec = FlexboxLayout . getChildMeasureSpec ( this . _currentWidthMeasureSpec ,
825+ view . effectivePaddingLeft + view . effectivePaddingRight + view . effectiveMarginLeft
826+ + view . effectiveMarginRight , view . effectiveWidth < 0 ? WRAP_CONTENT : Math . min ( view . effectiveWidth , originalMeasuredWidth ) ) ;
827+
828+ view . measure ( childWidthMeasureSpec , makeMeasureSpec ( newHeight , EXACTLY ) ) ;
829+
830+ if ( originalMeasuredWidth > view . getMeasuredWidth ( ) ) {
831+ childWidthMeasureSpec = makeMeasureSpec ( originalMeasuredWidth , EXACTLY ) ;
832+ view . measure ( childWidthMeasureSpec , makeMeasureSpec ( newHeight , EXACTLY ) ) ;
833+ }
824834 }
825835
826836 private _stretchViewHorizontally ( view : View , crossSize : number ) {
0 commit comments