From 7fbdc7adc8b585327d36d89da624411c969c9a60 Mon Sep 17 00:00:00 2001 From: Manol Donev Date: Wed, 7 Nov 2018 14:23:02 +0200 Subject: [PATCH] fix: layoutChanged event in landscape (#6520) --- tns-core-modules/ui/core/view/view.ios.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tns-core-modules/ui/core/view/view.ios.ts b/tns-core-modules/ui/core/view/view.ios.ts index 8352f7ae6..fe4e125d2 100644 --- a/tns-core-modules/ui/core/view/view.ios.ts +++ b/tns-core-modules/ui/core/view/view.ios.ts @@ -190,6 +190,9 @@ export class View extends ViewCommon { } else if (!this._isLaidOut) { // Rects could be equal on the first layout and an event should be raised. this._raiseLayoutChangedEvent(); + // But make sure event is raised only once if rects are equal on the first layout as + // this method is called twice with equal rects in landscape mode (vs only once in portrait) + this._isLaidOut = true; } }