You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FAB.Group component in React Native Paper, when closed, overlays the UI with a transparent layer that captures touch events on mobile browsers. This prevents users from interacting with elements beneath the FAB.Group, as seen in the attached screenshot.
I also noticed that the behaviour isn't consistent and depending on the scrolling status of the window, the interaction may not be blocked...
Expected behaviour
The FAB.Group should not interfere with the UI when in a closed state, allowing users to interact with other elements on the page.
How to reproduce?
Implement a FAB.Group component in a React Native Paper project.
Run the application in a mobile browser.
Close the FAB.Group component.
Try to interact with UI elements located under the closed FAB.Group.
Example code:
import*asReactfrom'react';import{StyleSheet,View,ScrollView}from'react-native';import{FAB,Portal,Text,Button}from'react-native-paper';importScreenWrapperfrom'../../ScreenWrapper';constBugFABExample=()=>{const[open,setOpen]=React.useState<boolean>(false);return(<ScreenWrapperstyle={styles.container}><ScrollView><Viewstyle={styles.content}><Textvariant="headlineMedium">InteractionTest</Text><Text>TryinteractingwiththebuttonsbelowwhentheFABisclosed:
</Text>{[...Array(10)].map((_,index)=>(<Buttonkey={index}mode="contained"onPress={()=>alert(`Button ${index+1} pressed`)}style={styles.button}>Button{index+1}</Button>))}</View></ScrollView><Portal><FAB.Groupopen={open}visibleicon={open ? 'close' : 'plus'}actions={[{icon: 'star',label: 'Star aaaaaaaaaaa',onPress: ()=>{}},{icon: 'email',label: 'Email bbbbbbbbbbb',onPress: ()=>{}},{icon: 'bell',label: 'Bell cccccccccc',onPress: ()=>{}},]}onStateChange={({ open })=>setOpen(open)}/></Portal></ScreenWrapper>);};conststyles=StyleSheet.create({container: {flex: 1,},content: {padding: 16,paddingBottom: 80,// Add some padding at the bottom to ensure scrollability},button: {marginVertical: 8,},});exportdefaultBugFABExample;
Preview
In this case you cannot press on button 8 in the highlighted area...
Current behaviour
The FAB.Group component in React Native Paper, when closed, overlays the UI with a transparent layer that captures touch events on mobile browsers. This prevents users from interacting with elements beneath the FAB.Group, as seen in the attached screenshot.
I also noticed that the behaviour isn't consistent and depending on the scrolling status of the window, the interaction may not be blocked...
Expected behaviour
The FAB.Group should not interfere with the UI when in a closed state, allowing users to interact with other elements on the page.
How to reproduce?
Implement a FAB.Group component in a React Native Paper project.
Run the application in a mobile browser.
Close the FAB.Group component.
Try to interact with UI elements located under the closed FAB.Group.
Example code:
Preview
In this case you cannot press on button 8 in the highlighted area...
What have you tried so far?
Your Environment
The text was updated successfully, but these errors were encountered: