Skip to content

fix: route screenPopped event to correct handler#8266

Open
yakirza17 wants to merge 1 commit intomasterfrom
fix/screen-popped-event-misrouted
Open

fix: route screenPopped event to correct handler#8266
yakirza17 wants to merge 1 commit intomasterfrom
fix/screen-popped-event-misrouted

Conversation

@yakirza17
Copy link
Copy Markdown

@yakirza17 yakirza17 commented Apr 9, 2026

Summary

  • registerScreenPoppedListener in ComponentEventsObserver.registerOnceForAllComponentEvents() was wired to this.notifyPreviewCompleted instead of this.notifyScreenPopped
  • This caused native screenPopped events (emitted after iOS swipe-back gesture pops a screen) to be dispatched as previewCompleted to component listeners, meaning no listener with a screenPopped handler would ever receive the event

Context

Reported via SCHED-45583 and Slack thread.

After the fix in PR #8222 to emit screenPopped on swipe-back, the event still didn't reach component listeners because of this wiring bug.

…server

registerScreenPoppedListener was wired to notifyPreviewCompleted instead
of notifyScreenPopped, causing screenPopped events to be dispatched as
previewCompleted. This prevented component listeners with a screenPopped
handler from receiving the event (e.g. after iOS swipe-back gesture).

Made-with: Cursor
@yakirza17 yakirza17 marked this pull request as ready for review April 9, 2026 10:27
Copilot AI review requested due to automatic review settings April 9, 2026 10:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes misrouting of the native screenPopped event so component listeners receive it via the correct handler, restoring expected behavior after iOS swipe-back pops a screen.

Changes:

  • Wire registerScreenPoppedListener to notifyScreenPopped (instead of notifyPreviewCompleted) in ComponentEventsObserver.registerOnceForAllComponentEvents().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants