-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] BackButtonBehavior IsEnabled - fix #28734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[iOS] BackButtonBehavior IsEnabled - fix #28734
Conversation
|
Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the issue where the IsEnabled property in BackButtonBehavior does not work correctly on iOS. The changes include new test cases to exercise the behavior, an update to the IsEnabledCore setter in BackButtonBehavior, and a check in ShellSectionRenderer that respects the IsEnabled setting.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28722.cs | Added a test to verify BackButtonBehavior.IsEnabled functionality |
| src/Controls/tests/TestCases.HostApp/Issues/Issue28722.cs | Updated the host app to include a page testing BackButtonBehavior behavior |
| src/Controls/src/Core/Shell/BackButtonBehavior.cs | Modified IsEnabledCore setter to combine the value with the current IsEnabled |
| src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs | Added a check to prevent navigation when BackButtonBehavior is disabled |
Comments suppressed due to low confidence (1)
src/Controls/src/Core/Shell/BackButtonBehavior.cs:77
- The new logic in the IsEnabledCore setter combines the assigned value with the current IsEnabled state, which may lead to unintended behavior if the public IsEnabled property is updated independently. Consider reviewing this logic to ensure it meets the intended behavior, or add a clarifying comment to prevent future confusion.
bool IsEnabledCore { set => SetValue(IsEnabledProperty, value && IsEnabled); }
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Issues Fixed
Fixes #28722