-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: Prevent recipient input to show multiline for selected address #22392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| /> | ||
| ), | ||
| [to, handleTextChange], | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should avoid useMemo for jsx fragments like this, We should rather prefer to create a separate small component. Or put it ininline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jpuri, fair comment - I forgot to remove that while trying to understand issue - making this inline.
| testID="recipient-address-input" | ||
| isStateStylesDisabled | ||
| style={INPUT_STYLE_OVERRIDE} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Focus Management Fails for Custom Input.
The custom Input element doesn't receive onBlur and onFocus handlers that TextField uses internally to manage its isFocused state. When inputElement is provided, TextField bypasses its internal handlers, breaking focus-dependent styling and preventing any parent onBlur/onFocus callbacks from being invoked. The custom Input needs explicit onBlur and onFocus props to maintain proper focus state management.
| testID="recipient-address-input" | ||
| isStateStylesDisabled | ||
| style={INPUT_STYLE_OVERRIDE} | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Custom Input Breaks TextField Focus Management
The custom Input element passed via inputElement bypasses TextField's internal focus/blur handlers and ref management. This breaks the TextField's focus state tracking (affecting visual styling), prevents the parent component's onBlur/onFocus callbacks from firing, and disables the ability to focus the input by pressing anywhere on the TextField container. The custom Input needs onBlur and onFocus handlers that call TextField's internal handlers, or these handlers need to be passed through somehow.
|



Description
This PR aims to fix recipient input to show multiline for selected address in send flow
Changelog
CHANGELOG entry: Fix recipient to be shown multi-line in send flow
Related issues
Fixes: #22207
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Replaces direct TextField props with a custom Input element to force single-line recipient addresses and prevent multiline behavior.
app/components/Views/confirmations/components/recipient-input/recipient-input.tsx)TextFieldinputElementwithfoundation/Inputto control behavior.multiline={false},numberOfLines={1},scrollEnabled={false},textAlignVertical="center",textBreakStrategy="simple".Input.INPUT_STYLE_OVERRIDEto remove height/lineHeight and pad adjustments; disable state styles; settextVariantviaTOKEN_TEXTFIELD_INPUT_TEXT_VARIANT.Written by Cursor Bugbot for commit e06f20c. This will update automatically on new commits. Configure here.