fix(ios): navigatingTo event handling (#10120)

This commit is contained in:
farfromrefuge
2022-12-28 17:23:10 +00:00
committed by GitHub
parent 6948f7c032
commit a4f28b8317
4 changed files with 95 additions and 62 deletions

View File

@@ -307,7 +307,16 @@ export class Frame extends FrameBase {
}
public _onNavigatingTo(backstackEntry: BackstackEntry, isBack: boolean) {
super._onNavigatingTo(backstackEntry, isBack);
// for now to not break iOS events chain (calling navigation events from controller delegates)
// we dont call super(which would also trigger events) but only notify the frame of the navigation
// though it means events are not triggered at the same time (lifecycle) on iOS / Android
this.notify({
eventName: Page.navigatingToEvent,
object: this,
isBack,
entry: backstackEntry,
fromEntry: this._currentEntry,
});
}
}