Skip to content

Add ExtraWindowEventListener interface#55721

Closed
zoontek wants to merge 4 commits intofacebook:mainfrom
zoontek:modal-system-bars-control
Closed

Add ExtraWindowEventListener interface#55721
zoontek wants to merge 4 commits intofacebook:mainfrom
zoontek:modal-system-bars-control

Conversation

@zoontek
Copy link
Copy Markdown
Contributor

@zoontek zoontek commented Feb 24, 2026

Summary:

This PR introduces a ExtraWindowEventListener interface that allows native modules to be notified when new windows are created or destroyed (e.g. Modal dialogs).

Third-party libraries can implement it, or emit window events through ReactContext.onExtraWindowCreate / ReactContext.onExtraWindowDestroy.

This opens the door for libraries like expo-navigation-bar to build a proper NavigationBar module that stays in sync across all windows (including modals).

Related issue

Changelog:

[ANDROID] [ADDED] - Add ExtraWindowEventListener interface to allow native modules to react to window creation / destruction (e.g. Modal dialogs)

Test Plan

Follow #56059 test plan

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 24, 2026
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Feb 24, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 2, 2026

@alanleedev has imported this pull request. If you are a Meta employee, you can view this in D94871845.

@zoontek zoontek force-pushed the modal-system-bars-control branch 8 times, most recently from 9fdaf8d to 6620980 Compare March 9, 2026 18:29
@zoontek zoontek force-pushed the modal-system-bars-control branch from 268f25a to f832c91 Compare March 11, 2026 14:46
@zoontek zoontek changed the title Fix StatusBar not applying to Modal windows on Android Add ExtraWindowEventListener interface Mar 11, 2026
@zoontek zoontek force-pushed the modal-system-bars-control branch from f832c91 to 3791a05 Compare March 11, 2026 15:36
@vitalNohj
Copy link
Copy Markdown

This would be huge for me to fix current production issues with the new Android policy to enforce edge to edge.

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Can you write some tests for this newly created API?

@cortinico
Copy link
Copy Markdown
Contributor

Also do we need an iOS equivalent?

@zoontek
Copy link
Copy Markdown
Contributor Author

zoontek commented Apr 14, 2026

@cortinico The main goal of this change is to allow updating the system UI style and visibility in modals (and other registered dialogs / activities), and it's not an issue on iOS.

@github-actions
Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

Copy link
Copy Markdown
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync bot closed this in 58fec1f Apr 16, 2026
@facebook-github-tools facebook-github-tools bot added the Merged This PR has been merged. label Apr 16, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 16, 2026

@alanleedev merged this pull request in 58fec1f.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @zoontek in 58fec1f

When will my fix make it into a release? | How to file a pick request?

@zoontek zoontek deleted the modal-system-bars-control branch April 17, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants