Skip to content

Commit

Permalink
Merge branch 'main' into fix/34120
Browse files Browse the repository at this point in the history
  • Loading branch information
dukenv0307 committed Jan 26, 2024
2 parents 7c9c40f + 7962905 commit 68ffee4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 40 deletions.

This file was deleted.

7 changes: 4 additions & 3 deletions src/components/TextInput/BaseTextInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,9 @@ function BaseTextInput(
*/}
{(!!autoGrow || autoGrowHeight) && (
// Add +2 to width on Safari browsers so that text is not cut off due to the cursor or when changing the value
// https://github.com/Expensify/App/issues/8158
// https://github.com/Expensify/App/issues/26628
// Reference: https://github.com/Expensify/App/issues/8158, https://github.com/Expensify/App/issues/26628
// For mobile Chrome, ensure proper display of the text selection handle (blue bubble down).
// Reference: https://github.com/Expensify/App/issues/34921
<Text
style={[
inputStyle,
Expand All @@ -447,7 +448,7 @@ function BaseTextInput(
]}
onLayout={(e) => {
let additionalWidth = 0;
if (Browser.isMobileSafari() || Browser.isSafari()) {
if (Browser.isMobileSafari() || Browser.isSafari() || Browser.isMobileChrome()) {
additionalWidth = 2;
}
setTextInputWidth(e.nativeEvent.layout.width + additionalWidth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import AmountTextInput from '@components/AmountTextInput';
import CurrencySymbolButton from '@components/CurrencySymbolButton';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as CurrencyUtils from '@libs/CurrencyUtils';
import * as MoneyRequestUtils from '@libs/MoneyRequestUtils';
import * as textInputWithCurrencySymbolPropTypes from './textInputWithCurrencySymbolPropTypes';
Expand All @@ -10,6 +11,7 @@ function BaseTextInputWithCurrencySymbol(props) {
const {fromLocaleDigit} = useLocalize();
const currencySymbol = CurrencyUtils.getLocalizedCurrencySymbol(props.selectedCurrencyCode);
const isCurrencySymbolLTR = CurrencyUtils.isCurrencySymbolLTR(props.selectedCurrencyCode);
const styles = useThemeStyles();

const currencySymbolButton = (
<CurrencySymbolButton
Expand Down Expand Up @@ -39,6 +41,7 @@ function BaseTextInputWithCurrencySymbol(props) {
props.onSelectionChange(e);
}}
onKeyPress={props.onKeyPress}
style={[styles.pr1]}
/>
);

Expand Down

0 comments on commit 68ffee4

Please sign in to comment.