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
[$1000] mWeb - Request money - There is No cursor in amount page #17714
@michaelhaxhiu It is a quite different issue than the issues being handled in #17579. In #17579 issue, we are dealing with Textinput with missing autofocus. Amount page already has autofocus but it is not being shown in mWeb. So, I think this issue should be independently handled.
changed the title [-]mWeb - Request money - There is No cursor in amount page[/-][+][$1000] mWeb - Request money - There is No cursor in amount page[/+]on Apr 26, 2023
📣 @narefyev91 You have been assigned to this job by @mountiny!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
Assigning Nikolay to this as he has worked on this page previously, there are some consideration to have regarding the selection which is buggy on native and we are working on a bigger refactor of this. So maybe this could be on hold for that
Please re-state the problem that we are trying to solve in this issue.
Input component is not get focus when page is mounted
What is the root cause of that problem?
Well i think there are a lot of discussion around this issue #10414 - which is the same as we facing here.
But i would like to also paste my findings.
I'm not quite sure that we will be able to fix it because of:
Safari on mobile does not support autoFocus
2) Safari prevent any manual on focus event - until user will make any interaction on the page https://bugs.webkit.org/show_bug.cgi?id=195884#c4
From Apple team:
We (Apple) like the current behaviour and do not want programmatic focus to bring up the keyboard when you do not have a hardware keyboard attached and the programmatic focus was not invoked in response to a user gesture. Why you may ask...because auto bringing up the software keyboard can be seen as annoying and a distraction to a user (not for your customers, but for everyone not using your app) given that:
We bring up the keyboard, which takes up valuable real estate on screen.
When we intent to bring up the software keyboard we zoom and scroll the page to give a pleasing input experience (or at least we hope it is pleasing; file bugs if not).
And i think even google was not able to make it working:
What changes do you think we should make in order to solve the problem?
The only potential fix here - which i think were already done before - when user click on numpad we add new value in input and focus a field.
updateAmountNumberPad(key) {
if (!this.textInput.isFocused()) {
this.textInput.focus();
}
The code already exists but it it not working as expected in safari ios - because when we mounted the page - this.textInput.isFocused() will be equal true - and that's why on safari ios - when you click on numpad - we see number - but not see cursor.
Possible solution here to create additional function same as above but with additional check something like this: if (!this.textInput.isFocused() || isMobileSafari()) focus input
Ohh I just saw the platform mentioned as iOS Safari, I thought it was native. I would recommend :donothing: here. This is the standard behavior by Apple, and I am sure that's the case across the app.
@mananjadhav@michaelhaxhiu@narefyev91@jasperhuangg this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Activity
MelvinBot commentedon Apr 20, 2023
Triggered auto assignment to @michaelhaxhiu (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.MelvinBot commentedon Apr 20, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)MelvinBot commentedon Apr 24, 2023
@michaelhaxhiu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
michaelhaxhiu commentedon Apr 26, 2023
Some talk about grouping this GH into a bigger auto-focus fix. I will review and update tomorrow
michaelhaxhiu commentedon Apr 26, 2023
@sobitneupane do you think we should group this fix with others? It's a legit bug report - there should indeed be a cursor here.
sobitneupane commentedon Apr 26, 2023
@michaelhaxhiu It is a quite different issue than the issues being handled in #17579. In #17579 issue, we are dealing with Textinput with missing autofocus. Amount page already has autofocus but it is not being shown in mWeb. So, I think this issue should be independently handled.
michaelhaxhiu commentedon Apr 26, 2023
Thanks really helpful, thanks @sobitneupane !
[-]mWeb - Request money - There is No cursor in amount page[/-][+][$1000] mWeb - Request money - There is No cursor in amount page[/+]MelvinBot commentedon Apr 26, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b32376b47d699980
13 remaining items
MelvinBot commentedon May 2, 2023
📣 @narefyev91 You have been assigned to this job by @mountiny!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
mountiny commentedon May 2, 2023
Assigning Nikolay to this as he has worked on this page previously, there are some consideration to have regarding the selection which is buggy on native and we are working on a bigger refactor of this. So maybe this could be on hold for that
jasperhuangg commentedon May 3, 2023
Still waiting on @narefyev91's PR, not overdue!
narefyev91 commentedon May 4, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Input component is not get focus when page is mounted
What is the root cause of that problem?
Well i think there are a lot of discussion around this issue #10414 - which is the same as we facing here.
But i would like to also paste my findings.
I'm not quite sure that we will be able to fix it because of:

2) Safari prevent any manual on focus event - until user will make any interaction on the page https://bugs.webkit.org/show_bug.cgi?id=195884#c4From Apple team:
We (Apple) like the current behaviour and do not want programmatic focus to bring up the keyboard when you do not have a hardware keyboard attached and the programmatic focus was not invoked in response to a user gesture. Why you may ask...because auto bringing up the software keyboard can be seen as annoying and a distraction to a user (not for your customers, but for everyone not using your app) given that:
And i think even google was not able to make it working:

What changes do you think we should make in order to solve the problem?
The only potential fix here - which i think were already done before - when user click on numpad we add new value in input and focus a field.
The code already exists but it it not working as expected in safari ios - because when we mounted the page - this.textInput.isFocused() will be equal true - and that's why on safari ios - when you click on numpad - we see number - but not see cursor.
Possible solution here to create additional function same as above but with additional check something like this:
if (!this.textInput.isFocused() || isMobileSafari()) focus inputWhat alternative solutions did you explore?
cc @mananjadhav @michaelhaxhiu @jasperhuangg
mananjadhav commentedon May 4, 2023
Ohh I just saw the platform mentioned as iOS Safari, I thought it was native. I would recommend :donothing: here. This is the standard behavior by Apple, and I am sure that's the case across the app.
MelvinBot commentedon May 4, 2023
@mananjadhav @michaelhaxhiu @narefyev91 @jasperhuangg this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
jasperhuangg commentedon May 8, 2023
Ah I agree, I think it's a relatively minor quirk that we shouldn't really be focusing our time on, especially if this is true:
Closing, thanks everyone!