From 914edcb7b6c1dc44fd40a10503fc111daf765086 Mon Sep 17 00:00:00 2001 From: Manol Donev Date: Wed, 7 Nov 2018 11:48:28 +0200 Subject: [PATCH] fix: layoutChanged event in landscape --- 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 8352f7ae6e..fe4e125d22 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; } }