feat(action-sheet): Add cancelable parameter#2285
Open
OS-pedrogustavobilro wants to merge 17 commits intomainfrom
Open
feat(action-sheet): Add cancelable parameter#2285OS-pedrogustavobilro wants to merge 17 commits intomainfrom
OS-pedrogustavobilro wants to merge 17 commits intomainfrom
Conversation
Only is applied if no cancel option is provided. References: https://outsystemsrd.atlassian.net/browse/RMET-3576
|
Released dev build of action-sheet with dev version: 8.0.2-dev-2285-20260220T160338.0 |
action-sheet/ios/Sources/ActionSheetPlugin/ActionSheetPlugin.swift
Outdated
Show resolved
Hide resolved
OS-ricardomoreirasilva
approved these changes
Jan 14, 2025
alexgerardojacinto
approved these changes
Jan 14, 2025
Cannot consitently set action sheet / UIAlertController as non-cancelable across iOS versions, particularly iOS 26.
Contributor
Author
|
Hey @alexgerardojacinto @jcesarmobile I had to make some adjustments to the iOS implementation, due to changes in iOS 26 (and also fixing some stuff that was broken in the old implementation), also updated the PR description, feel free to review whenever you can 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add parameter to allow action-sheet to be cancelable (clicking outside the sheet, and using the system back button on Android), and in case it is canceled, return it in the result.
Notes:
cancelableparameter is not configurable for iOS - the sheet is always cancelable. I've tried to work around this but wasn't able to get it not both not cancel and return a result to the plugin at the same time across different iOS versions (most notably iOS 26). Alternatively we could use a custom UIController, but it wouldn't guarantee to look the same as it does + since the issue was manually for Android, I don't think we need to go into that level of detail.To test, use this branch from capacitor-test-app, that has the latest dev build of action-sheet plugin - https://github.com/ionic-team/capacitor-testapp/tree/feat/test-new-action-sheet-feature
Fixes #2154