Skip to content

Commit

Permalink
fix: remove whitespace at bottom of web-view after keyboard dismiss (#…
Browse files Browse the repository at this point in the history
…6253)

### Description

After merging #6217, there is a residual whitespace after dismissing the
keyboard in web views; this PR removes that whitespace.


| Android Before | Android After | 
| ----- | ----- | 
| <video
src="https://github.com/user-attachments/assets/ff6a2386-f8c6-4c17-bc52-4ac1d83620d9"
/> | <video
src="https://github.com/user-attachments/assets/ba1358fc-63f0-4b34-8cac-ccf7a9edbb95"
/> |

### Test plan
- [ ] Tested locally on iOS
- [x] Tested locally on Android

### Related issues

N/A

### Backwards compatibility

Yes

### Network scalability

N/A
  • Loading branch information
MuckT authored Nov 22, 2024
1 parent 6daa3bf commit 9ddea5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webview/WebViewScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ShouldStartLoadRequest } from 'react-native-webview/lib/WebViewTypes'
import AppAnalytics from 'src/analytics/AppAnalytics'
import { DappExplorerEvents, WebViewEvents } from 'src/analytics/Events'
import { openDeepLink } from 'src/app/actions'
import KeyboardSpacer from 'src/components/KeyboardSpacer'
import Touchable from 'src/components/Touchable'
import WebView, { WebViewRef } from 'src/components/WebView'
import { DEEP_LINK_URL_SCHEME } from 'src/config'
Expand Down Expand Up @@ -218,6 +219,7 @@ function WebViewScreen({ route, navigation }: Props) {
mediaPlaybackRequiresUserAction={mediaPlaybackRequiresUserAction}
testID={activeDapp ? `WebViewScreen/${activeDapp.name}` : 'RNWebView'}
/>
<KeyboardSpacer />
</KeyboardAvoidingView>
{Platform.OS === 'android' && (
<WebViewAndroidBottomSheet
Expand Down Expand Up @@ -264,7 +266,7 @@ const styles = StyleSheet.create({
flex: 1,
},
keyboardView: {
flex: 1,
flexGrow: 1,
},
loading: {
position: 'absolute',
Expand Down

0 comments on commit 9ddea5a

Please sign in to comment.