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
{{ message }}
Repository navigation
App - Unable to scroll the PDF attachment with 2 pages (pay on 22/6) #3247
We use react-native-modal for our Modals. In this library, there's a known issue where using a ScrollView inside a swipeable Modal causes that Modal to ignore the scroll movement (react-native-modal/react-native-modal#236).
Our PDF component (from react-native-pdf) is a ScrollView. So when we try to use it inside our Modal component we run into the issue mentioned above.
The workarounds mentioned in that issue involve wrapping the content of our ScrollView inside a TouchableOpacity or a View with a custom lifecycle for the gesture responder. In our case, since the ScrollView is added by a library, this would require a patch to the library.
I think a better solution would be to make our PDF Modals not swipeable. It's already the case that our PDF Modals can't be closed by swiping (since the swipe movements are captured by the PDF), so making it not swipeable would fix the bug without changing any other behavior.
A good way to do this would be creating a new MODAL_TYPE in /src/styles/getModalStyles.js, for our PDF Modals. It would be the same as the current one, but without the swipeDirection.
changed the title [-]App - Unable to scroll the PDF attachment with 2 pages[/-][+]App - Unable to scroll the PDF attachment with 2 pages (pay on 22/6)[/+]on Jun 15, 2021
Activity
MelvinBot commentedon May 31, 2021
Triggered auto assignment to @Gonals (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.Gonals commentedon Jun 1, 2021
Changing to weekly and sending to the pool!
isagoico commentedon Jun 7, 2021
Issue reproducible today during KI retests
MelvinBot commentedon Jun 7, 2021
Triggered auto assignment to @bfitzexpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.rdjuric commentedon Jun 8, 2021
Proposal
We use react-native-modal for our Modals. In this library, there's a known issue where using a ScrollView inside a swipeable Modal causes that Modal to ignore the scroll movement (react-native-modal/react-native-modal#236).
Our PDF component (from react-native-pdf) is a ScrollView. So when we try to use it inside our Modal component we run into the issue mentioned above.
The workarounds mentioned in that issue involve wrapping the content of our ScrollView inside a TouchableOpacity or a View with a custom lifecycle for the gesture responder. In our case, since the ScrollView is added by a library, this would require a patch to the library.
I think a better solution would be to make our PDF Modals not swipeable. It's already the case that our PDF Modals can't be closed by swiping (since the swipe movements are captured by the PDF), so making it not swipeable would fix the bug without changing any other behavior.
A good way to do this would be creating a new MODAL_TYPE in /src/styles/getModalStyles.js, for our PDF Modals. It would be the same as the current one, but without the swipeDirection.
MelvinBot commentedon Jun 8, 2021
Triggered auto assignment to @iwiznia (
Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.iwiznia commentedon Jun 8, 2021
@rdjuric that proposal sounds good (assuming it actually works 😄 )
@bfitzexpensify can you hire in upwork?
rdjuric commentedon Jun 9, 2021
@iwiznia Cool! I went ahead and made a PR #3487
isagoico commentedon Jun 13, 2021
Issue reproducible today during KI retests
bfitzexpensify commentedon Jun 15, 2021
Reopening so I remember to pay this out in seven days if there are no regressions.
[-]App - Unable to scroll the PDF attachment with 2 pages[/-][+]App - Unable to scroll the PDF attachment with 2 pages (pay on 22/6)[/+]bfitzexpensify commentedon Jun 23, 2021
Done!