Skip to content

Commit 34ae9fa

Browse files
rozelefacebook-github-bot
authored andcommitted
Fix issue with zIndex child removal (#49900)
Summary: Pull Request resolved: #49900 This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in `onViewRemoved` prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was [added](#43389) to fix a bug in Reanimated. cc bartlomiejbloniarz to confirm if [this Reanimated issue](software-mansion/react-native-reanimated#5715) resurfaces from this change. Fixes #49838 ## Changelog [Android][Fixed] Fixes issue with z-indexed sibling removal Reviewed By: NickGerleman, cipolleschi Differential Revision: D70795631 fbshipit-source-id: 500af92226be29af73f36f911ffff27a0c083ae9
1 parent e1464c0 commit 34ae9fa

File tree

1 file changed

+0
-3
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view

1 file changed

+0
-3
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java

-3
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,6 @@ public void onViewRemoved(View child) {
594594
UiThreadUtil.assertOnUiThread();
595595
checkViewClippingTag(child, Boolean.TRUE);
596596
if (!customDrawOrderDisabled()) {
597-
if (indexOfChild(child) == -1) {
598-
return;
599-
}
600597
getDrawingOrderHelper().handleRemoveView(child);
601598
setChildrenDrawingOrderEnabled(getDrawingOrderHelper().shouldEnableCustomDrawingOrder());
602599
} else {

0 commit comments

Comments
 (0)