Signal-iOS icon indicating copy to clipboard operation
Signal-iOS copied to clipboard

Active chat scrolls back half a screen on app switch in landscape mode on iPad

Open andrew-hill opened this issue 4 years ago • 26 comments

Bug description

The active chat scrolls backwards about half a screen when I switch apps (including just going back to home screen and re-opening Signal after a couple of seconds). This only seems to happen in landscape mode on my iPad, not portrait mode.

Steps to reproduce

  • Open Signal on iPad in landscape mode
  • Select a chat (individual or group) that has more than a full ‘screen’ worth of chat content
  • While the chat is active, switch to the home screen or another app
  • Switch back to Signal

Actual result: The chat has scrolled backwards/up a few lines, I estimate about half a screen (i.e. what is at the very bottom of the chat window is what should be in the vertical centre of the chat window). This occurs even when no new messages have been received (i.e. it’s not maintaining the scroll position). This is nearly 100% repeatable in my experience, and only applies to the active/visible chat at the time of app-switching.

Expected result: The chat window should either be at the bottom of the dialogue or the last viewed position (I don’t know which of these Signal defaults to, but it certainly shouldn’t scroll to half-a-screen-before-the-end).

Screenshots

Screenshot before app switch, test chat is scrolled to the bottom IMG_0317

Screenshot after app switch, dialogue has ‘scrolled up’, can’t see most recent messages anymore IMG_0318

Device info

Device: iPad Pro 11” (1st gen)

iOS version: 14.7.1

Signal version: 5.19.1.2

andrew-hill avatar Sep 13 '21 05:09 andrew-hill

I can reliably reproduce this on both of iOS devices (iPad and iPhone), on iOS 15 and latest Signal version, as well.

plmcgrn avatar Oct 07 '21 05:10 plmcgrn

I can also reproduce this on my iPad (iOS 15.0.2, Signal 5.21.4.6).

iPhone works fine for me.

Very annoying, every time you open Signal you first have to scroll back down in the chat...

notDavid avatar Oct 15 '21 08:10 notDavid

Happens also on my iPhone 11 Pro Max iOS 15.0.2 Signal version 5.21.4.6

AntonioALEA1996 avatar Oct 15 '21 08:10 AntonioALEA1996

This is happening for me as well. Signal 5.26.5.0, iPad Pro 2021 12.9”.

TyroneSama avatar Dec 12 '21 21:12 TyroneSama

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Feb 10 '22 22:02 stale[bot]

This still happens and annoys me daily.

metajack avatar Feb 10 '22 22:02 metajack

This bug still occurs exactly as previously described on the latest versions of iPadOS and Signal.

andrew-hill avatar Feb 10 '22 23:02 andrew-hill

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 12 '22 01:04 stale[bot]

Yes it's still relevant and yes this bot sucks.

plmcgrn avatar Apr 12 '22 03:04 plmcgrn

In the hope of aiding someone who might think about this problem some day...

I noticed the distance the screen scrolls back is very slightly more than 50% of the scrollable message view area's height - it's about 53%. That is measuring from the points where the scrollable view meets (or appears to go blurry behind) the top area (conversation title, camera icon) and bottom area ("New message" entry, camera/microphone icons). This is an odd figure, I can't see why it would scroll back 53% (I was expecting it would be exactly half way). This could just be a mismatch between how/where I'm measuring and the exact extents of the scrollable message view object.

I had a look at ConversationViewController+Scroll.swift, which seems to handle the scrolling by way of functions like

  • scrollToBottomOfConversation
  • scrollToInitialPosition

but am not familiar enough with the codebase to be certain which function is even being called when first opening a conversation like this. The function 'scrollToInteraction' stood out as it appears to be the main place where scrolling calculation is performed, i.e. offset from screen/view edges. There is one alignment case (center) where it appears to subtract half the collectionView height.

I'm happy to do further testing to help clarify the exact behavior, if the devs cannot repeat it. Just let me know...

andrew-hill avatar Apr 20 '22 07:04 andrew-hill

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Jun 19 '22 17:06 stale[bot]

Bad bot

plmcgrn avatar Jun 19 '22 19:06 plmcgrn

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

My dear bot, I wish I knew what else I could do... I have done all I can think of to help move this forward. I would be very happy to provide any further information or conduct further testing if anyone has specific requests.

andrew-hill avatar Jun 20 '22 01:06 andrew-hill

I notice it everyday on my iPad too. It does the opposite when on portrait mode.

  • On landscape mode, it scrolls up half the screen.
  • On portrait mode, it scrolls down the same amount, if not at the bottom already.

To reproduce the scroll down issue, similar to landscape issue:

  • Switch to portrait mode
  • Scroll up more than half a screen in a chat
  • Switch to homepage or another app
  • Switch back to Signal

ktml avatar Jun 22 '22 12:06 ktml

I just came across #4592, which sounds like a very similar issue was previously fixed in Signal v3.21, according to @Imperiopolis-Signal. So perhaps one of the fixes in 3.21 has been inadvertently reverted since then?

Not sure I'm quite on the money with my diff, in terms of what constitutes the 3.21 release vs what was public at the time of #4592, but potentially one or both of the following were the fix for #4592.

  • cc4b55ebc3cc6a7e316167a4608f153abfc88e04
  • e26ccaa08af7d22f0c16fb84fc3e29c6ec6bcaf0

The code has changed a fair bit since 3.21, including Swift vs Obj C, so not sure if this is actually much help...

andrew-hill avatar Sep 05 '22 07:09 andrew-hill

Another theory, as I vaguely recall reporting the bug a while (likely a month or so) after noticing it, is that it could be related to the improvements made in 2bb4ecd10daa9bd1fffadeeab6401af08a74c8da. It's not clear to me if the scroll continuity is continuity between views of the chat window (e.g. app switching, with background updates) or if it's more about the animation of scrolling and loading content at the same time, but perhaps another useful starting point if anyone who understands the code better than I has the time to look.

andrew-hill avatar Sep 05 '22 07:09 andrew-hill

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 04 '22 12:12 stale[bot]

This issue has been closed due to inactivity.

stale[bot] avatar Dec 11 '22 14:12 stale[bot]

This is still an issue... please re-open.

notDavid avatar Dec 11 '22 15:12 notDavid

As above. Again. This is still an issue. Can we not make @stale bot less agressive?

andrew-hill avatar Dec 13 '22 08:12 andrew-hill

This has affected me for a long time now. Quite annoying.

WorldIRC avatar Jan 01 '23 15:01 WorldIRC

@EvanHahn-Signal hoping you can reopen this issue for us. I have a thread on Reddit too with similar complaints.

Thanks!

WorldIRC avatar Jan 08 '23 10:01 WorldIRC

in case the project admins are not aware, users and reporters of the issue are not able to re-open the issue once stale bot has closed it.

if you are willing to acknowledge the possible existence of this issue (and i'd hope that confirmation by 8 separate users might warrant this?), please tag this issue as "Don't mark stale" or similar so we can do away with the stale bot.

andrew-hill avatar Jan 11 '23 05:01 andrew-hill

I emailed this to Signal support and they have "filed a bug ticket" with the engineering team.

WorldIRC avatar Mar 10 '23 15:03 WorldIRC

Apologies. This is a bug and we've filed a ticket in our internal tracker.

EvanHahn-Signal avatar Mar 24 '23 15:03 EvanHahn-Signal

Thank you @EvanHahn-Signal for acknowledging!

WorldIRC avatar Mar 24 '23 15:03 WorldIRC