mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(ios): navigatingTo event handling (#10120)
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user