-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unmount method in UIManagerMountHook and use it to notify not int…
…ersecting state in IntersectionObserver (#45186) Summary: Pull Request resolved: #45186 Changelog: [internal] (this is an internal change because `IntersectionObserver` hasn't been released yet). When testing IntersectionObserver, I realized that it wasn't triggering notifications for elements not intersecting when the surface that contained them was completely deallocated. This is unexpected because IntersectionObserver notifications are delivered when the element is removed from the root, but not when the root itself is removed. This fixes that behavior by: 1. Adding a method in `UIManagerMountHooks` to get a notification about the surface being unmounted. This is necessary to keep the API backwards compatible. 2. Using that method in `IntersectionObserverManager` to notify all observers (and report a change if necessary). Reviewed By: javache Differential Revision: D59061136 fbshipit-source-id: ef5669f9d6b08d98652489e6731902d192ec28f8
- Loading branch information
1 parent
2cb04b4
commit 39b33f1
Showing
6 changed files
with
61 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters