fix: Android - Search - Keyboard is not automatically opened despite input being focused.#71056
Conversation
…input being focused. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@hoangzinh sorry for the bump, @allgandalf will review this. |
Codecov Report❌ Patch coverage is
... and 5 files with indirect coverage changes 🚀 New features to boost your workflow:
|
| import type {RefObject} from 'react'; | ||
| import type {AnimatedTextInputRef} from '@components/RNTextInput'; | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars |
There was a problem hiding this comment.
why are we disabling this?
| /** We added a delay to focus on text input to allow navigation/modal animations to get completed, | ||
| *see issue https://github.com/Expensify/App/issues/65855 for more details | ||
| */ | ||
| const useFocusAfterNav = (ref: RefObject<AnimatedTextInputRef | null>) => { |
There was a problem hiding this comment.
Please create a separate type file lets keep the code DRY
| return false; | ||
| }; | ||
|
|
||
| export default useFocusAfterNav; |
There was a problem hiding this comment.
import {useFocusEffect} from '@react-navigation/native';
import {RefObject} from 'react';
import type {AnimatedTextInputRef} from '@components/RNTextInput';
import CONST from '@src/CONST';
const useFocusAfterNav = (ref: RefObject<AnimatedTextInputRef | null>) => {
useFocusEffect(() => {
const timeoutId = setTimeout(() => {
ref.current?.focus();
}, CONST.ANIMATED_TRANSITION);
return () => clearTimeout(timeoutId);
});
};
export default useFocusAfterNav;isn't the above a clean way to write things ?
There was a problem hiding this comment.
Yes it is! updated.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
allgandalf
left a comment
There was a problem hiding this comment.
sweet!!, will test these changes and get back
|
@allgandalf 👋🏻👀 |
|
On my list for today |
|
@Krishna2323 can you merge main, i tested the code and it was very weird for me |
|
Testing fresh later today |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-10-16.at.11.04.51.AM.movAndroid: mWeb ChromeScreen.Recording.2025-10-16.at.11.05.53.AM.moviOS: HybridAppScreen.Recording.2025-10-16.at.10.54.01.AM.moviOS: mWeb SafariScreen.Recording.2025-10-16.at.10.55.32.AM.movMacOS: Chrome / SafariScreen.Recording.2025-10-16.at.10.49.32.AM.movMacOS: DesktopScreen.Recording.2025-10-16.at.11.22.33.AM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/amyevans in version: 9.2.33-0 🚀
|
|
@Krishna2323 QA team still faces this original issue on Android 1760667303762.screen-20251017-051415.mp4 |
|
@Krishna2323 can you please take a look |
|
@IuliiaHerets can you please test again? since from our testing the fix should work ;) |
|
@allgandalf issue is still reproduced for the QA team, build v9.2.33-4 mobizen_20251018_071455.mp4 |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.2.33-4 🚀
|
Explanation of Change
Fixed Issues
$ #65855
$ #69034
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4