App icon indicating copy to clipboard operation
App copied to clipboard

Input switch between focus and blurr state on click & label is selected with respect to input text

Open parasharrajat opened this issue 5 years ago • 45 comments

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:

  1. Open Profile Page.
  2. Click on the First name input.
  3. Now click on the First Name label over it. You should see that input is losing focus and then regaining it.
  4. Now click on the text on the input.
  5. Now click on the empty area on the right side of First Name label inside the whole blue box.
  6. 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:

View all open jobs on Upwork

view this job

parasharrajat avatar Aug 09 '21 21:08 parasharrajat

Triggered auto assignment to @conorpendergrast (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Aug 09 '21 21:08 MelvinBot

PROPOSAL

  1. Make the label text not selectable: Set selectable prop of Animated.Text to false.

https://github.com/Expensify/App/blob/75a1fe0b4ebfa1819ad1efa608a45aa8bd07e41b/src/components/ExpensiTextInput/ExpensiTextInputLabel/index.js#L6-L25

  1. To prevent the TextInput to switch between blur and focus, it needs to change some styling:
  • In expensiTextInputLabel, setting the zIndex prop to -1, to keep from interfering with TextInput area. https://github.com/Expensify/App/blob/75a1fe0b4ebfa1819ad1efa608a45aa8bd07e41b/src/styles/styles.js#L514-L522
  • Change expensiTextInputContainer padding props to expensiTextInput. 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.

Screen Shot 2021-08-10 at 15 36 17

By moving the padding props from TouchableWithoutFeedback to TextInput, the area will be the following (Black border).

Screen Shot 2021-08-10 at 15 37 55 Screen Shot 2021-08-10 at 15 38 07

AlfredoAlc avatar Aug 10 '21 22:08 AlfredoAlc

@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?

2021-08-11_14-10-24

conorpendergrast avatar Aug 11 '21 13:08 conorpendergrast

@conorpendergrast Sorry, it's a little early. This is yet to be deployed to staging.

parasharrajat avatar Aug 11 '21 14:08 parasharrajat

@parasharrajat Huh... This is 4 days overdue. Who can take care of this?

MelvinBot avatar Aug 16 '21 19:08 MelvinBot

@parasharrajat 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

MelvinBot avatar Aug 18 '21 19:08 MelvinBot

@parasharrajat 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

MelvinBot avatar Aug 20 '21 19:08 MelvinBot

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 avatar Aug 20 '21 19:08 parasharrajat

@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?

mallenexpensify avatar Aug 20 '21 21:08 mallenexpensify

Yes, it is reproducible on Staging.

parasharrajat avatar Aug 20 '21 21:08 parasharrajat

@parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Aug 24 '21 19:08 MelvinBot

@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

mallenexpensify avatar Aug 25 '21 15:08 mallenexpensify

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.

parasharrajat avatar Aug 25 '21 15:08 parasharrajat

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 avatar Aug 25 '21 15:08 mallenexpensify

@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 avatar Aug 25 '21 16:08 parasharrajat

@parasharrajat Eep! 4 days overdue now. Issues have feelings too...

MelvinBot avatar Aug 30 '21 19:08 MelvinBot

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

mallenexpensify avatar Aug 30 '21 20:08 mallenexpensify

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!

MelvinBot avatar Sep 23 '21 19:09 MelvinBot

@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.
image image

Moving along to Engineering

mallenexpensify avatar Sep 23 '21 20:09 mallenexpensify

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

MelvinBot avatar Sep 23 '21 20:09 MelvinBot