You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Awaiting Checklist] [Due for payment 2025-09-02] [$250] Search - Cursor is not visible when pasting a long text in search field #67210
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.1.84-3 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://github.com/Expensify/Expensify/issues/493003 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: macOS Sequoia 15.5 App Component: Search/Router
Action Performed:
Go to staging.new.expensify.com
Copy a long search query (eg, type:expense workspace:BD19AF1A66B0E7D8 hey hey hey hey hey hey hey hey)
Click on the search modal on the top right.
Paste the long search query.
Expected Result:
The cursor will remain visible at the end.
Actual Result:
The cursor is not visible. User will have to scroll to the end to see the cursor.
Please re-state the problem that we are trying to solve in this issue.
Search - Cursor is not visible when pasting a long text in search field
What is the root cause of that problem?
The loading indicator container always takes the required space once the inputProps.isLoading turns to a boolean and in SearchAutocompleteInput, we are using animated TextInputClearButton, so there are two icons.
When pasting long text into the input, the input field expands to fill all available width (excluding the TextInputClearButton). However, once inputProps.isLoading is set to true, the ActivityIndicator appears, causing the text input to shrink slightly and cursor to be hidden.
What changes do you think we should make in order to solve the problem?
We have multiple ways to solve this issue:
Instead of using the loading indicator from the input, we should render it inside SearchAutocompleteInput, we will hide the TextInputClearButton when isSearchingForReports is true. We also need to remove isLoading prop and loadingSpinnerStyle.
Always pass a boolean to isLoading prop of TextInput, so the loading indicator always takes the required space and the input is rendered in the available space. Update the prop value isSearchingForReports to !!isSearchingForReports
Update the condition below to !!inputProps.isLoading &&.
We can use shouldShowClearButton prop TextInput and remove the animated clear button in SearchAutocompleteInput, this will also required to add some props in TextInput to modify the clear button.
We should check for similar bugs in other components also, where we are using multiple icons. If we decide to update the text input component then we have to make changed in the native file also.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
🚨 Edited by proposal-police: This proposal was edited at 2025-08-01 14:08:32 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search - Cursor is not visible when pasting a long text in search field
What is the root cause of that problem?
The loading indicator occupies space whenever isLoading has a boolean value—true, false, or even undefined as seen here. When a long string is pasted or the user types until the input reaches its full width, and the loading indicator appears for the first time, the input reserves space for the clear button (due to isLoading being true). This causes the ActivityIndicator to render over the suffix area, pushing the text and making the cursor invisible.
Other solutions:
Should check explicit inputProps.isLoading === true here so that the loading indicator will only appear when it actually in loading state
Additionally, If we want to place the loading indicator over the clear button in loading state. This way, we only have 1 suffix icon either loading indicator or clear button
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
Cursor not visible in search RHN for long pasted text.
The same behaviour is seen if you switch to another window and come back to new expensify, the cursor is missing, irrespective of whether it is pasted text or typed text. This is not an issue with long text. This is seen with short one word text as search input.
What is the root cause of that problem?
There are 2 problems here.
cursor going hidden due to appearance of activity indicator thats loaded for a long text
text field out of focus the moment we switch windows an hence while returning, focus is not on the text field and hence cursor is not displayed
What changes do you think we should make in order to solve the problem?
Explicitly check for inputProps.isLoading === true from state, alongside undefined check, to ensure that it is visible only during actual loading of reports, instead of always.
For the lost focus of text control while switching windows (ALT + TAB), pressing of ALT takes control to chrome settings button. This is a default chrome behaviour. Similar is with clicking on another window using mouse. Persist the tab index to state onLostFocus of window and set it back from state onWindowActive.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N.A.
What alternative solutions did you explore? (Optional)
@RachCHopkins, you can try directly pasting type:expense workspace:9132779747441AFB reportid:R00F3Ilaf4A8 date: or paste type:expense workspace:9132779747441AFB reportid:R00F3Ilaf4A8 date:2025-07-04, then select 2025-07-04 by dragging cursor and remove it.
Or maybe we just need better repro steps, it looks like @kpadmanabhan may have already come up with better repro steps here.
@RachCHopkins : I am having 100% reproducibility using the steps mentioned in the description in Windows Chrome browser.
Screenshot of the same is posted here
The text being pasted just need to be long enough for the cursor to be hidden under the activity indicator. Content of the text pasted is not relevant.
Also additionaly I noticed that switching window and coming back to expensify takes the cursor focus away from the search text field.
changed the title [-][Due for payment 2025-09-02] [$250] Search - Cursor is not visible when pasting a long text in search field[/-][+][Awaiting Checklist] [Due for payment 2025-09-02] [$250] Search - Cursor is not visible when pasting a long text in search field[/+]on Sep 1, 2025
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Copy a long search query(eg. type:expense workspace:9132779747441AFB reportid:R00F3Ilaf4A8 date:)
Open search modal > Paste the query in the input
Verify that the loading indicator is shown, and once loading is complete, it shows the clear button in the same place and hides the loading indicator
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jul 26, 2025
Triggered auto assignment to @RachCHopkins (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.Krishna2323 commentedon Jul 26, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search - Cursor is not visible when pasting a long text in search field
What is the root cause of that problem?
inputProps.isLoadingturns to a boolean and inSearchAutocompleteInput, we are using animatedTextInputClearButton, so there are two icons.TextInputClearButton). However, onceinputProps.isLoadingis set to true, theActivityIndicatorappears, causing the text input to shrink slightly and cursor to be hidden.App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Lines 464 to 476 in 4b68aa8
App/src/components/Search/SearchAutocompleteInput.tsx
Lines 244 to 255 in 4b68aa8
What changes do you think we should make in order to solve the problem?
We have multiple ways to solve this issue:
SearchAutocompleteInput, we will hide theTextInputClearButtonwhenisSearchingForReportsis true. We also need to removeisLoadingprop andloadingSpinnerStyle.isLoadingprop ofTextInput, so the loading indicator always takes the required space and the input is rendered in the available space. Update the prop valueisSearchingForReportsto!!isSearchingForReports!!inputProps.isLoading &&.App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Line 464 in 4b68aa8
shouldShowClearButtonpropTextInputand remove the animated clear button inSearchAutocompleteInput, this will also required to add some props inTextInputto modify the clear button.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Result
Result after solution 1
Details
Monosnap.screencast.2025-07-27.00-33-08.mp4
Result after solution 2
Details
Monosnap.screencast.2025-07-27.00-35-09.mp4
Result after solution 3
Details
Monosnap.screencast.2025-07-27.00-40-48.mp4
lorretheboy commentedon Jul 26, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-08-01 14:08:32 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search - Cursor is not visible when pasting a long text in search field
What is the root cause of that problem?
The loading indicator occupies space whenever isLoading has a boolean value—true, false, or even undefined as seen here. When a long string is pasted or the user types until the input reaches its full width, and the loading indicator appears for the first time, the input reserves space for the clear button (due to isLoading being true). This causes the ActivityIndicator to render over the suffix area, pushing the text and making the cursor invisible.
App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Lines 464 to 476 in feb0965
What changes do you think we should make in order to solve the problem?
Solution to reserve the area for loading, we just need to remove condition here
App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Line 464 in 4b68aa8
Other solutions:
Should check explicit
inputProps.isLoading === truehere so that the loading indicator will only appear when it actually in loading stateApp/src/components/TextInput/BaseTextInput/implementation/index.tsx
Line 464 in feb0965
Then the opacity style will be alway 1
StyleUtils.getOpacityStyle(1)App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Line 473 in feb0965
Result:
Screen.Recording.2025-07-27.at.04.27.34.mov
Additionally, If we want to place the loading indicator over the clear button in loading state. This way, we only have 1 suffix icon either loading indicator or clear button
Check
!isSearchingForReportsas wellApp/src/components/Search/SearchAutocompleteInput.tsx
Line 244 in e36300d
Replace
styles.ml1byStyles can be updated by on specific requirements if needed
App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Line 470 in feb0965
Result:
Screen.Recording.2025-07-27.at.04.26.54.mov
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
kpadmanabhan commentedon Jul 27, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Cursor not visible in search RHN for long pasted text.

The same behaviour is seen if you switch to another window and come back to new expensify, the cursor is missing, irrespective of whether it is pasted text or typed text. This is not an issue with long text. This is seen with short one word text as search input.
What is the root cause of that problem?
There are 2 problems here.
What changes do you think we should make in order to solve the problem?
isLodingis assigned toisSearchingForReportswhich should have been a background activity. Also visible area should have been 1 space more to display blinking cursor.https://github.com/Expensify/App/blob/e36300de578fb39e3dc1a102a1cdfda5c710fd4d/src/components/Search/SearchAutocompleteInput.tsx#L236C25-L242
Visibility of activity indicator is set to true once
isLoadingis true as well.App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Lines 464 to 476 in 4b68aa8
Explicitly check for
inputProps.isLoading === truefrom state, alongsideundefinedcheck, to ensure that it is visible only during actual loading of reports, instead of always.App/src/components/TextInput/BaseTextInput/implementation/index.tsx
Lines 464 to 476 in feb0965
Also check if
isSearchingForReportsexplicitly to decide whether to show activity indicator or not.App/src/components/Search/SearchAutocompleteInput.tsx
Lines 244 to 248 in e36300d
For the lost focus of text control while switching windows (ALT + TAB), pressing of ALT takes control to chrome settings button. This is a default chrome behaviour. Similar is with clicking on another window using mouse. Persist the tab index to state onLostFocus of window and set it back from state onWindowActive.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N.A.
What alternative solutions did you explore? (Optional)
N.A.
RachCHopkins commentedon Jul 30, 2025
Legit long query (let's not use garbage):
type:expense status:paid,approved,done group-by:reports feed:"testing 11121",,"Expensify Demo 11121" currency:USD expense-type:card reimbursable:no date<2025-06-30I'm seeing the cursor. I can't repro this.
My version is v9.1.86-3 so maybe it's fixed already.
RachCHopkins commentedon Jul 30, 2025
Or maybe we just need better repro steps, it looks like @kpadmanabhan may have already come up with better repro steps here.
Krishna2323 commentedon Jul 30, 2025
@RachCHopkins, you can try directly pasting
type:expense workspace:9132779747441AFB reportid:R00F3Ilaf4A8 date:or pastetype:expense workspace:9132779747441AFB reportid:R00F3Ilaf4A8 date:2025-07-04, then select2025-07-04by dragging cursor and remove it.Monosnap.screencast.2025-07-30.13-14-33.mp4
kpadmanabhan commentedon Jul 30, 2025
@RachCHopkins : I am having 100% reproducibility using the steps mentioned in the description in Windows Chrome browser.
Screenshot of the same is posted here
The text being pasted just need to be long enough for the cursor to be hidden under the activity indicator. Content of the text pasted is not relevant.
Also additionaly I noticed that switching window and coming back to expensify takes the cursor focus away from the search text field.
izarutskaya commentedon Jul 30, 2025
Reproducible on Windows 10/Chrome/Build 9.1.87-2
2025-07-30.12-15-14.mp4
RachCHopkins commentedon Jul 31, 2025
Thanks everyone!
41 remaining items
garrettmknight commentedon Sep 1, 2025
Payment summary:
[-][Due for payment 2025-09-02] [$250] Search - Cursor is not visible when pasting a long text in search field[/-][+][Awaiting Checklist] [Due for payment 2025-09-02] [$250] Search - Cursor is not visible when pasting a long text in search field[/+]Krishna2323 commentedon Sep 1, 2025
Requested in NewDot!
Pujan92 commentedon Sep 2, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/58364/files#r2314942847
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
type:expense workspace:9132779747441AFB reportid:R00F3Ilaf4A8 date:)Do we agree 👍 or 👎
JmillsExpensify commentedon Sep 2, 2025
$250 approved for @Pujan92
melvin-bot commentedon Sep 4, 2025
@garrettmknight Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
flaviadefaria commentedon Sep 8, 2025
$250 approved for @Krishna2323