Skip to content

Commit 5050d0a

Browse files
yungstersfacebook-github-bot
authored andcommitted
VirtualView: Fix Window Focus Detection Cleanup (#52621)
Summary: Pull Request resolved: #52621 In D77261958, I made a typo when implementing the cleanup of window focus detection in `onDetachedFromWindow`. This fixes it. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D78366506 fbshipit-source-id: 2a377cd7e8ec08f0c899dbd9cb3757bec580d30f
1 parent 46f3e32 commit 5050d0a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view/ReactVirtualView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public class ReactVirtualView(context: Context) :
101101
ReactScrollViewHelper.removeScrollListener(this)
102102
ReactScrollViewHelper.removeLayoutChangeListener(this)
103103
if (detectWindowFocus) {
104-
viewTreeObserver.addOnWindowFocusChangeListener(onWindowFocusChangeListener)
104+
viewTreeObserver.removeOnWindowFocusChangeListener(onWindowFocusChangeListener)
105105
}
106106
cleanupLayoutListeners()
107107
}

0 commit comments

Comments
 (0)