[CP Staging] fix(iOS): prevent native MVCP from activating when disabled flag is set in FlashList patch 007#89253
Conversation
|
|
|
Confirmed working! As this will be CP'ed to staging, let's make sure this doesn't cause any side effect.
|
|
Just retested and confirmed above issues are still fixed. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.mp4Android: mWeb ChromeiOS: HybridAppios.MP4iOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
|
🚧 @JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
…-disabled-blank-space [CP Staging] fix(iOS): prevent native MVCP from activating when disabled flag is set in FlashList patch 007 (cherry picked from commit 7a7b159) (cherry-picked to staging by arosiclair)
|
🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.3.64-24 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/arosiclair in version: 9.3.64-31 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/arosiclair in version: 9.3.65-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.65-6 🚀
|
Explanation of Change
Patch 007 (
fix-scroll-anchor-unmount-on-ios) introduced a regression wheremaintainVisibleContentPositionInternal— which is forwarded to the native iOSScrollViewas themaintainVisibleContentPositionprop — became{disabled: true, minIndexForVisible: 0}instead ofundefinedfor lists that havemaintainVisibleContentPosition={{disabled: true}}(e.g.BaseSearchList).The native
ScrollViewdoesn't understand thedisabledfield — it sees an active MVCP config and activates MVCP. When entering selection mode on Spend > Expenses, a header renders outside the FlashList as a sibling, causing a layout shift. The active native MVCP "corrects" the scroll position, producing a blank space at the top.Fix: split the two conditions that patch 007 incorrectly unified:
scrollAnchor: keepmaintainVisibleContentPosition != null—ScrollAnchorstays mounted when the prop exists, preserving the original fix (no stale_prevFirstVisibleFrame→ no scroll jump)maintainVisibleContentPositionInternal: add&& !maintainVisibleContentPosition.disabled— native MVCP only activates when truly enabledFixed Issues
$ #89191
PROPOSAL:
Tests
Regression check (original bugs fixed by patch 007):
9. Open a chat with multiple messages and IOUs — scroll up and down on iOS, verify no sudden scroll jump to top
10. Open a permalinked report and scroll up quickly — verify MVCP toggles cleanly without scroll reset
Offline tests
N/A — this fix is purely a FlashList scroll behaviour patch, unaffected by network state.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
Nagranie.z.ekranu.2026-04-30.o.10.16.26.mov
iOS: mWeb Safari
MacOS: Chrome / Safari