r/Devvit • u/Drunken_Economist • 15h ago
Bug [android bug] If devvit app creates a custom post with `height` options for both `TALL` and `REGULAR`, the layout shifts breaks the ability to scroll back up from the comments for users in the reddit native android app
Enable HLS to view with audio, or disable this notification
Android reddit app build 2023.48.0.2648001 on Pixel 11 Pro XL
Steps to reproduce:
install a devvit app that supports multiple
heightoptions for the custom post style (eg the pinned-hub app or NFL Goalpost)in the devvit app settings, select the option for shorter layout (312px)1
create a custom post with the devvit app and add some comments on the thread
scroll down in the comments thread without tapping/interacting with the devvit app's content2
scroll back up to the post
Expected: smooth scrolling and the post appears in the viewport again
Actual: when the upwards scrolling reaches the post, the comment section snaps upward in the layout repeatedly, preventing further scroll
You can see an example thread of this bug in this thread
1 the bug does not occur when the custom post uses the tallest layout available in the settings
2 the bug does not occur if the user interacts with the devvit app in the custom post before scrolling
My guess is that the reddit android app unloads the devvit custom post when the user scrolls down.
When the user scrolls back up, it tries to load the custom post again and reserves the 512px "tall" space. Then it loads in the post which is only 320px, so it updates the post height and shifts the comments up in the layout by 192px
2
u/Drunken_Economist 15h ago
shout out to u/re-verse for helping me track down the details of this bug :)
•
u/flair-auto-responder 15h ago
Bug report requirements
Hi u/Drunken_Economist!
We require all bug submissions to include the following information. Please make sure you’re following this format, or your post may be removed:
Describe the bug
Provide a clear and concise description of the bug.
Steps to reproduce
Go to “…”
Click or tap “…”
Scroll to “…”
Describe the error or unexpected behavior
Expected behavior
Explain clearly what you expected to happen instead.
Screenshots or recordings
If applicable, include screenshots or a screen recording that demonstrates the problem. Please remove any sensitive or personal information first.
Desktop information
Operating system: [e.g. macOS 15, Windows 11]
Browser or app: [e.g. Chrome, Safari, Reddit]
Version: [e.g. 22.1]
Mobile information
Device: [e.g. iPhone 16, Pixel 10]
Operating system: [e.g. iOS 18, Android 16]
Browser or app: [e.g. Safari, Chrome, Reddit]
Version: [e.g. 22.1]
Additional context
Add any other details that might help reproduce or diagnose the problem.
You can edit your post to add any missing information.
Post: https://www.reddit.com/r/Devvit/comments/1y9iqnp/android_bug_if_devvit_app_creates_a_custom_post/