fix(ios): missing cancel button when using popover action sheet (running on iPad or with SDK26 on iPhone) #55077
+23
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes #55074 by reverting to
UIAlertActionStyleDefaultfor iPad action sheet and iOS26 action sheet (meaning app was built with SDK26, is running on iOS26, and withoutUIDesignRequiresCompatibilityenabled).Changelog:
[IOS] [FIXED] - ActionSheet: prevent cancelButtonIndex from causing buttons to disappear when using popover action sheet
Test Plan:
Used https://github.com/mlisikbf/MobileTest_ActionSheet/tree/test-patch as a starting point. It has the change applied via patch-package, and uses action sheets with/without an anchor, and with/without cancelButtonIndex. Scenarios to test:
built with SDK26, running iOS26
Simulator.Screen.Recording.-.iPad.A16.-.2026-01-07.at.13.58.01.mov
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-01-07.at.14.02.45.mov
built with SDK26, running iOS18
Simulator.Screen.Recording.-.iPad.mini.6th.generation.-.2026-01-07.at.14.25.21.mov
Simulator.Screen.Recording.-.iPhone.16.iOS.18.-.2026-01-07.at.14.25.09.mov
built with SDK 18, running iOS26
(cannot install older build tools atm, but this will be the same case as
UIDesignRequiresCompatibilitybelow)built with SDK26, running iOS26 with `UIDesignRequiresCompatibility`
Simulator.Screen.Recording.-.iPad.A16.-.2026-01-07.at.14.51.33.mov
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-01-07.at.14.53.47.mov