Skip to content

Fix(JS): Screen Popped Listener - #8364

Open
mihnea-popescu wants to merge 1 commit into
wix:masterfrom
mihnea-popescu:fix/notify-screen-popped
Open

Fix(JS): Screen Popped Listener#8364
mihnea-popescu wants to merge 1 commit into
wix:masterfrom
mihnea-popescu:fix/notify-screen-popped

Conversation

@mihnea-popescu

Copy link
Copy Markdown

Problem

ComponentEventsObserver.registerOnceForAllComponentEvents was passing notifyPreviewCompleted to registerScreenPoppedListener. This meant ScreenPopped events fired the wrong notification (and any screenPopped listeners on components never ran).

Fix

  • register notifyScreenPopped as the listener for the native ScreenPopped event, instead of notifyPreviewCompleted
  • add a regression test asserting ScreenPopped and PreviewCompleted are wired to their own distinct handlers

Verification

  • yarn jest src/events/ComponentEventsObserver.test.tsx — 14/14 tests passed
  • yarn eslint --ext .js,.jsx,.ts,.tsx src/events/ComponentEventsObserver.ts src/events/ComponentEventsObserver.test.tsx --quiet

Breaking changes

None.

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.

1 participant