[$2000] Content off screen and keyboard opens when navigating to default rooms
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:
- Create workspace
- Navigate to default room
Expected Result:
Navigating to a default room shows the chat content within the page
Actual Result:
Navigating to a default room shows the chat content half off screen and the keyboard opens Issue is repro when no chats in the room
Workaround:
unknown
Platform:
Where is this issue occurring?
- Mobile Web - Safari
Version Number: 1.1.44-3
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL: Issue reported by: @neil-marcellini Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1647980292349759
Triggered auto assignment to @Beamanator (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Triggered auto assignment to @adelekennedy (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Looks like a good issue to be solved externally π
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (Exported)
Triggered auto assignment to @tgolen (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Still waiting for proposals
time to DOUBLE!
And it's time to double again
It's time to double again!
Proposal
Remove the autoFocus, when the room has just been created (no action history)
Overview
What is causing this issue, is when you open a room, and there is no action on that report, except the "CREATED" actionName, this enables autoFocus
https://github.com/Expensify/App/blob/e7565c1aae9ee4a8f366932d63483619d742e970/src/pages/home/report/ReportActionCompose.js#L507
as you can see in this line, the autoFocus is being tiggered by _.size(this.props.reportActions) === 1 condition.
Solution
Removes the _.size(this.props.reportActions) === 1 condition, this will open the report screen without autofocusing the text input, and the issue will be gone.
This will change the behavior of having the autofocus when you open a room without any previous action. but it will keep consistency with other rooms that have already an action history (list of messages).
@tgolen
OK, I think we want to still have the auto-focus functionality. That was purposefully added. I think the solution for this is to fix why the content is halfway off the screen.
We're at the doubling point again but it looks like @anboia proposal is under review/awaiting a tweak @tgolen @rushatgabhane?
@adelekennedy not moving forward with @anboia's proposal because https://github.com/Expensify/App/issues/8292#issuecomment-1108866564
A proposal will ideally need to explain why the content is cut off
@Expensify/contributor-plus feel free to pick this issue up, I'm unassigning because I'll be OOO. No untriaged proposals yet. Thanks!
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)
Current assignee @tgolen is eligible for the Exported assigner, not assigning anyone new.
@anboia 's root cause analysis is correct here. Autofocus creates issues in Safari mWeb, Whenever an offscreen input gains focus safari will try to move that into the view. https://jsbin.com/kefisiceme/edit?html,css,js
But as mentioned, we do need that focus on input. So let us know how will you solve that issue.
π£ @mananjadhav You have been assigned to this job by @michaelhaxhiu! 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 π
π£ @parasharrajat You have been assigned to this job by @michaelhaxhiu! 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 π