react-native-keyboard-aware-scroll-view icon indicating copy to clipboard operation
react-native-keyboard-aware-scroll-view copied to clipboard

[BUG] paddingBottom styling property is forced to zero on Android

Open alexisdelage opened this issue 2 years ago • 3 comments

Description

On the FormScrollView component, when passing custom styles to the prop contentContainerStyle as an array, the property paddingBottom is override to 0 on Android.

Exemple

 <KeyboardAwareScrollView
      enableOnAndroid
      contentContainerStyle={[
        { flexGrow: 1 },
        { paddingBottom: 75 },
      ]}
    />

Result: The paddingBottom is applied on iOS but not on Android.

Possible cause

The paddingBottom property is override at this line in the code: https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/9eee405f7b3e261faf86a0fc8e495288d91c853e/lib/KeyboardAwareHOC.js#L531 It checks if a paddingBottom property is present on the contentContainerStyle object before setting it zero, but it does not handle the case where contentContainerStyle is an array (which can be the case according to the type of StyleProp<ViewStyle> of React Native

alexisdelage avatar May 19 '23 10:05 alexisdelage

Same for me

VictorPulzz avatar May 30 '23 08:05 VictorPulzz

@slorber My be you check this?

VictorPulzz avatar May 30 '23 08:05 VictorPulzz

I am not maintaining this library and haven't used RN recently

slorber avatar Jun 09 '23 14:06 slorber