diff --git a/packages/core/ui/core/properties/index.ts b/packages/core/ui/core/properties/index.ts index b9c16ed010..7a387db102 100644 --- a/packages/core/ui/core/properties/index.ts +++ b/packages/core/ui/core/properties/index.ts @@ -834,9 +834,10 @@ export class CssAnimationProperty implements CssAnimationPro } } } - if (property.affectsLayout) { - view.requestLayout(); - } + } + // properties without a native setter (height, width, margins on iOS) still need the layout + if (property.affectsLayout && (computedValueChanged || isSet !== wasSet)) { + view.requestLayout(); } const eventName = property.eventName; if (computedValueChanged && (!__UI_USE_EXTERNAL_RENDERER__ || !view._suspendNativeUpdatesCount) && this.hasListeners(eventName)) { diff --git a/packages/core/ui/core/view-base/index.ts b/packages/core/ui/core/view-base/index.ts index a7f36a157c..7a25493f41 100644 --- a/packages/core/ui/core/view-base/index.ts +++ b/packages/core/ui/core/view-base/index.ts @@ -823,6 +823,11 @@ export abstract class ViewBase extends Observable { if (!this._suspendNativeUpdatesCount) { this.onResumeNativeUpdates(); } + if (shouldResumeRequestLayout) { + // layout requests received while suspended were only recorded: replay them now, + // otherwise the next measure reuses the cached size and ignores the changes + this.requestlayoutIfNeeded(); + } } /**