Skip to content

Commit

Permalink
fix(suite-native): keyboard persits tap on send amount switch button
Browse files Browse the repository at this point in the history
  • Loading branch information
PeKne committed Oct 1, 2024
1 parent 7b3e25e commit 8656b3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Icon } from '@suite-common/icons-deprecated';
import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
import { Box } from '@suite-native/atoms';

type SwitchAmountsButtonProps = { onPress: () => void };

const BUTTON_TOP_OFFSET = 40;
const BUTTON_PADDING = 6;

Expand All @@ -24,7 +26,7 @@ const buttonStyle = prepareNativeStyle(utils => ({
borderRadius: utils.borders.radii.round,
}));

export const SwitchAmountsButton = ({ onPress }: { onPress: () => void }) => {
export const SwitchAmountsButton = ({ onPress }: SwitchAmountsButtonProps) => {
const { applyStyle } = useNativeStyles();

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const ScreenContentWrapper = ({
scrollViewRef.current = ref as unknown as ScrollView;
}}
keyboardDismissMode={keyboardDismissMode}
keyboardShouldPersistTaps="handled"
contentInsetAdjustmentBehavior="automatic"
extraHeight={extraKeyboardAvoidingViewHeight}
contentContainerStyle={applyStyle(screenContentWrapperStyle)}
Expand Down

0 comments on commit 8656b3c

Please sign in to comment.