Input switch between focus and blurr state on click & label is selected with respect to input text
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Open Profile Page.
- Click on the First name input.
- Now click on the
First Namelabel over it. You should see that input is losing focus and then regaining it. - Now click on the text on the input.
- Now click on the empty area on the right side of
First Namelabel inside the whole blue box. - You should see that input is losing focus and then regaining it..
Expected Result:
Already focused input should not switch between focused and blur state. the label should be static after the first focus. label text should not be selectable.
Actual Result:
Input switch between blur and focused state. Label text is selectable.
Workaround:
None. UI glitch
Platform:
Where is this issue occurring?
- Web
- Desktop App
Version Number: Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/24370807/128778144-f822a3e3-7596-4efc-a97b-d441fb746719.mp4
Expensify/Expensify Issue URL:
Triggered auto assignment to @conorpendergrast (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
PROPOSAL
- Make the label text not selectable: Set
selectableprop ofAnimated.Textto false.
https://github.com/Expensify/App/blob/75a1fe0b4ebfa1819ad1efa608a45aa8bd07e41b/src/components/ExpensiTextInput/ExpensiTextInputLabel/index.js#L6-L25
- To prevent the
TextInputto switch between blur and focus, it needs to change some styling:
- In
expensiTextInputLabel, setting thezIndexprop to -1, to keep from interfering withTextInputarea. https://github.com/Expensify/App/blob/75a1fe0b4ebfa1819ad1efa608a45aa8bd07e41b/src/styles/styles.js#L514-L522 - Change
expensiTextInputContainerpaddingprops toexpensiTextInput. https://github.com/Expensify/App/blob/75a1fe0b4ebfa1819ad1efa608a45aa8bd07e41b/src/styles/styles.js#L502-L513
The area of the TextInput is limited by the padding of the TouchableWithoutFeedback which is what triggers focus on the TextInput, by passing that padding into the TextInput style, the styling is the same but the area of the TextInput increases at the same size of the container.
This is the area of the TextInput (Black border), that is why if the user clicks somewhere outside this area, blur is called.
By moving the padding props from TouchableWithoutFeedback to TextInput, the area will be the following (Black border).
@parasharrajat I'm struggling to reproduce this one too! I'm on web app Staging (v1.0.83-1) and It looks like I'm seeing something different. Is the account you're seeing this on a beta that I can add?

@conorpendergrast Sorry, it's a little early. This is yet to be deployed to staging.
@parasharrajat Huh... This is 4 days overdue. Who can take care of this?
@parasharrajat 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@parasharrajat 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
I am sure about the process anymore. cc: @mallenexpensify . I used to think that proposals should be submitted after the task is triaged but that is not the case anymore and why the engineer was removed from this issue.
@parasharrajat , right now it's still in the triage state because Conor wasn't able to reproduce. After triage it goes to our general Engineering pool to see if the issue can be worked on by an External contributor. The it's assigned to a Contributor Manager (CM) to post to upwork then a Contributor Manager Engineer (CME ) is assigned to review proposals.
Is the issue reproducible on staging and/or production now?
Yes, it is reproducible on Staging.
@parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@parasharrajat I'm still unable to reproduce on web-staging. Should I be doing something else?
https://user-images.githubusercontent.com/22508304/130816462-85cd9044-f63e-4ad9-9163-fc57fc7d9f36.mp4
Look at the Video https://user-images.githubusercontent.com/24370807/128778144-f822a3e3-7596-4efc-a97b-d441fb746719.mp4 @mallenexpensify
I am clicking on the label and you can also try clicking the empty area next to the label.
I see it in your vid, is that web? If so, what browsers? and... can you confirm you're on staging? I tried firefox and chrome on staging and was unable to reproduce
@mallenexpensify I found this on staging v1.0.86-10 Web firefox/It's also on chrome.
https://user-images.githubusercontent.com/24370807/130827496-9c27c09d-b3d9-4088-974a-54fbcc997d6c.mp4
@parasharrajat Eep! 4 days overdue now. Issues have feelings too...
Put on hold til we're able to reproduce, dropped note in #expensify-open-source in case others encounter the issue https://expensify.slack.com/archives/C01GTK53T8Q/p1630356577153700
This issue has not been updated in over 15 days. @parasharrajat eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
@parasharrajat , thanks for the patience, it took me a lil bit to understand the issue, I was able to reproduce on Chrome - staging. I also noticed it happens for the change password screens and request money.

Moving along to Engineering
Triggered auto assignment to @thienlnam (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.