App icon indicating copy to clipboard operation
App copied to clipboard

[$2000] Content off screen and keyboard opens when navigating to default rooms

Open mvtglobally opened this issue 4 years ago β€’ 143 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. Create workspace
  2. 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 IMG_0158D0729524-1

Expensify/Expensify Issue URL: Issue reported by: @neil-marcellini Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1647980292349759

View all open jobs on GitHub

mvtglobally avatar Mar 24 '22 05:03 mvtglobally

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

melvin-bot[bot] avatar Mar 24 '22 05:03 melvin-bot[bot]

Triggered auto assignment to @adelekennedy (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] avatar Mar 24 '22 07:03 melvin-bot[bot]

Looks like a good issue to be solved externally πŸ‘

Beamanator avatar Mar 24 '22 07:03 Beamanator

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (Exported)

melvin-bot[bot] avatar Mar 26 '22 00:03 melvin-bot[bot]

Triggered auto assignment to @tgolen (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Mar 26 '22 00:03 melvin-bot[bot]

Still waiting for proposals

tgolen avatar Apr 04 '22 13:04 tgolen

time to DOUBLE!

adelekennedy avatar Apr 04 '22 14:04 adelekennedy

And it's time to double again

adelekennedy avatar Apr 12 '22 16:04 adelekennedy

It's time to double again!

adelekennedy avatar Apr 18 '22 18:04 adelekennedy

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

anboia avatar Apr 25 '22 07:04 anboia

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.

tgolen avatar Apr 25 '22 17:04 tgolen

We're at the doubling point again but it looks like @anboia proposal is under review/awaiting a tweak @tgolen @rushatgabhane?

adelekennedy avatar Apr 25 '22 19:04 adelekennedy

@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

rushatgabhane avatar Apr 26 '22 01:04 rushatgabhane

@Expensify/contributor-plus feel free to pick this issue up, I'm unassigning because I'll be OOO. No untriaged proposals yet. Thanks!

rushatgabhane avatar Apr 26 '22 01:04 rushatgabhane

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)

melvin-bot[bot] avatar Apr 26 '22 17:04 melvin-bot[bot]

Current assignee @tgolen is eligible for the Exported assigner, not assigning anyone new.

melvin-bot[bot] avatar Apr 26 '22 17:04 melvin-bot[bot]

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

parasharrajat avatar Apr 26 '22 20:04 parasharrajat

πŸ“£ @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 πŸ“–

melvin-bot[bot] avatar Apr 27 '22 21:04 melvin-bot[bot]

πŸ“£ @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 πŸ“–

melvin-bot[bot] avatar May 01 '22 22:05 melvin-bot[bot]