From e7aef1a0c27466e94449f8d621b595dad444d2f3 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Tue, 17 Oct 2023 03:35:14 +0530 Subject: [PATCH 1/2] fix: Android - Keyboard stays open when getting back to amount input page. Signed-off-by: Krishna Gupta --- src/pages/iou/IOUCurrencySelection.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index cd14dcd25f11..12ac3eaa4cf3 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -1,4 +1,5 @@ import React, {useState, useMemo, useCallback, useRef} from 'react'; +import {Keyboard} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; @@ -78,6 +79,7 @@ function IOUCurrencySelection(props) { const confirmCurrencySelection = useCallback( (option) => { const backTo = lodashGet(props.route, 'params.backTo', ''); + Keyboard.dismiss(); // When we refresh the web, the money request route gets cleared from the navigation stack. // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. // To prevent any negative experience, we have made the decision to simply close the currency selection page. From 1e937f2933cc3115bce319d9be52960158982cff Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Tue, 17 Oct 2023 20:38:18 +0530 Subject: [PATCH 2/2] minor spacing fix. Signed-off-by: Krishna Gupta --- src/pages/iou/IOUCurrencySelection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 12ac3eaa4cf3..554a869de30f 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -80,6 +80,7 @@ function IOUCurrencySelection(props) { (option) => { const backTo = lodashGet(props.route, 'params.backTo', ''); Keyboard.dismiss(); + // When we refresh the web, the money request route gets cleared from the navigation stack. // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. // To prevent any negative experience, we have made the decision to simply close the currency selection page.