From 93beb83abef42b92db43ee3bb8b156f486a6c00f Mon Sep 17 00:00:00 2001 From: Xin Chen Date: Mon, 4 Oct 2021 17:50:52 -0700 Subject: [PATCH] Allow overflow scroll to clip the view instead of let it be visible Summary: When the overflow style set to 'scroll', React ViewGroup does nothing to the container. Instead it should be clipped just like hidden. Changelog: [Android][Changed] - Setting `overflow: scroll` in View component style will clip the children in the View container Reviewed By: javache Differential Revision: D31350605 fbshipit-source-id: e0d618f5e872fec9cf9ecb2d4cfe7af9a2f3c063 --- .../main/java/com/facebook/react/views/view/ReactViewGroup.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java index c0bf085c8f2f96..8bf0f0b4faf23f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java @@ -786,6 +786,7 @@ private void dispatchOverflowDraw(Canvas canvas) { } break; case ViewProps.HIDDEN: + case ViewProps.SCROLL: float left = 0f; float top = 0f; float right = getWidth();