Skip to content

Commit 7fbdc7a

Browse files
authored
fix: layoutChanged event in landscape (#6520)
1 parent 4c08839 commit 7fbdc7a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎tns-core-modules/ui/core/view/view.ios.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ export class View extends ViewCommon {
190190
} else if (!this._isLaidOut) {
191191
// Rects could be equal on the first layout and an event should be raised.
192192
this._raiseLayoutChangedEvent();
193+
// But make sure event is raised only once if rects are equal on the first layout as
194+
// this method is called twice with equal rects in landscape mode (vs only once in portrait)
195+
this._isLaidOut = true;
193196
}
194197
}
195198

0 commit comments

Comments
 (0)