Skip to content

Commit

Permalink
fix(dapps): dismiss keyboard before external browser dapp open (#3924)
Browse files Browse the repository at this point in the history
### Description

Dismisses the keyboard on external browser dapp open.

### Test plan

Tested Locally on iOS

### Related issues

N/A

### Backwards compatibility

Yes
  • Loading branch information
MuckT authored Jul 6, 2023
1 parent 52f7139 commit e9bd94c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/BottomSheetScrollView.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BottomSheetScrollView as RNBottomSheetScrollView } from '@gorhom/bottom-sheet'
import React, { useState } from 'react'
import { LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'
import React, { useEffect, useState } from 'react'
import { Keyboard, LayoutChangeEvent, StyleProp, StyleSheet, View, ViewStyle } from 'react-native'
import { useSafeAreaFrame, useSafeAreaInsets } from 'react-native-safe-area-context'
import { BottomSheetParams } from 'src/navigator/types'
import { Spacing } from 'src/styles/styles'
Expand Down Expand Up @@ -30,6 +30,11 @@ function BottomSheetScrollView({ handleContentLayout, containerStyle, testId, ch
}
}

// Dismiss keyboard on mount
useEffect(() => {
Keyboard.dismiss()
}, [])

return (
<RNBottomSheetScrollView
style={{
Expand Down

0 comments on commit e9bd94c

Please sign in to comment.