wordpress-mobile / WordPress-iOS

WordPress for iOS - Official repository
http://ios.wordpress.org/
GNU General Public License v2.0
3.66k stars 1.11k forks source link

Scroll views with Jetpack banner can momentarily become unresponsive #19338

Open twstokes opened 1 year ago

twstokes commented 1 year ago

Expected behavior

Scroll view to be responsive to user's input at all times.

Actual behavior

Scroll view momentarily ignores user input until the scrolling animation is completed.

https://user-images.githubusercontent.com/2092798/191875250-fd83257e-871d-4daf-8036-b7fc54f70efd.mp4

Steps to reproduce the behavior

  1. Using the WordPress app, tap Notifications
    • Note: The number of notifications matter - 11 notifications will reproduce this on an iPhone 14 form factor
  2. Scroll to the bottom of the view
  3. Observe that the animations may lurch and input may be ignored until the scroll view is at rest

Root cause

This is due to how we calculate the banner visibility. The scroll view's frame size expands or contracts depending on if the banner is hidden or shown. If the scroll view's content height is close enough to the frame size, a loop occurs where the banner toggles between being shown and hidden. This is visually smoothed over by UIKit, but the scroll view is unresponsive until it settles.

Tested on iPhone 14, iOS 16, WPiOS 20.8
twstokes commented 1 year ago

Reopening as this occurred using an iPhone 14 in landscape with three rows in the People view. See "Known issues" in https://github.com/wordpress-mobile/WordPress-iOS/pull/19797.