Skip to content

Comments

[iOS 26 & Catalyst 26] [Follow-up PR] Fixed IsEnabled behavior on Tabs#33337

Merged
rmarinho merged 3 commits intodotnet:mainfrom
SubhikshaSf4851:Fix-33158
Jan 31, 2026
Merged

[iOS 26 & Catalyst 26] [Follow-up PR] Fixed IsEnabled behavior on Tabs#33337
rmarinho merged 3 commits intodotnet:mainfrom
SubhikshaSf4851:Fix-33158

Conversation

@SubhikshaSf4851
Copy link
Contributor

@SubhikshaSf4851 SubhikshaSf4851 commented Dec 30, 2025

Root Cause

On iOS and Mac Catalyst 26 version, drag and selection gestures allow navigation to disabled tabs which leads to inconsistent with the UI and expected behavior.

Description of Change

  • Since navigation can be achieved via drag and select in iOS and Mac Catalyst version 26, updated the ShouldSelectViewController logic in ShellItemRenderer.cs to prevent selection of disabled tabs on iOS and Mac Catalyst by returning false when a tab's IsEnabled property is false.

Issues Fixed

Fixes #33158

Tested the behavior in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Follow UP PR : 33369

Before Issue Fix After Issue Fix
Screen.Recording.2026-01-05.at.15.49.31.mov
Screen.Recording.2026-01-05.at.16.00.54.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 30, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@SubhikshaSf4851! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 30, 2025
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman added platform/macos macOS / Mac Catalyst platform/ios area-controls-shell Shell Navigation, Routes, Tabs, Flyout labels Dec 30, 2025
@sheiksyedm sheiksyedm marked this pull request as ready for review December 31, 2025 13:59
Copilot AI review requested due to automatic review settings December 31, 2025 13:59
Copy link
Contributor

Copilot AI left a 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 IsEnabled property for Shell tabs on iOS and Mac Catalyst. Previously, disabled tabs could still be selected through drag gestures or direct selection. The fix implements initial IsEnabled state application at tab creation and prevents selection of disabled tabs in the ShouldSelectViewController delegate.

Key Changes

  • Added runtime check in ShouldSelectViewController to prevent selection of disabled tabs
  • Applied initial IsEnabled state when tab items are created or the collection changes
  • Added UI test to verify the fix works correctly

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellItemRenderer.cs Adds IsEnabled check in ShouldSelectViewController and applies initial enabled state for tabs in two locations
src/Controls/tests/TestCases.HostApp/Issues/Issue33158.cs Creates test UI page with three tabs (first and third enabled, second disabled) to demonstrate the issue
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33158.cs Implements NUnit test that verifies disabled tab cannot be selected and can be enabled at runtime

@PureWeen
Copy link
Member

/rebase

@PureWeen
Copy link
Member

/azp run maui-pr-uitests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one looks good but I want to wait until we have our iOS 26 UI test lane up before we merge this. I've set it to SR4, by then we should hopefully have it merged

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you split this into two PRs?

One that has the iOS26 changes and one that has the general changes?
That way we can at least merge the general changes for now and once we get iOS 26 UItests up we can merge the other changes

@github-project-automation github-project-automation bot moved this from Todo to Changes Requested in MAUI SDK Ongoing Jan 2, 2026
@SubhikshaSf4851 SubhikshaSf4851 changed the title [iOS & Catalyst ] Fixed IsEnabled property should work on Tabs [iOS 26 & Catalyst 26] [Follow-up PR] Fixed IsEnabled behavior on Tabs Jan 5, 2026
@SubhikshaSf4851
Copy link
Contributor Author

@PureWeen As suggested, I’ve split it into two PRs: 33369 for general changes and 33337 for iOS 26–specific changes.

PureWeen pushed a commit that referenced this pull request Jan 5, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
Copy link
Contributor

@StephaneDelcroix StephaneDelcroix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved

Code Review Summary:

The fix correctly addresses the iOS 26/Mac Catalyst 26 issue where disabled Shell tabs can be selected via drag gestures.

Strengths

  • Minimal, surgical change (9 lines added)
  • Proper version guard using OperatingSystem.IsIOSVersionAtLeast(26)
  • Backwards compatible - doesn't affect iOS < 26
  • Well-commented code explaining the iOS 26 behavior
  • Improved variable naming (rrenderer)

Notes

  • Tests from PR #33369 (merged to inflight/current) will cover this scenario once both merge to main
  • Cannot fully validate on current simulators since iOS 26 is a future version, but code logic is verified correct
  • Waiting for iOS 26 UI test lane (per PureWeen's earlier comment) is the right approach

LGTM! 🚀

@StephaneDelcroix StephaneDelcroix dismissed PureWeen’s stale review January 7, 2026 13:35

Changes requested have been addressed - PR was split as requested. PR #33369 (general changes) was merged, and this PR now contains only the iOS 26-specific changes.

@StephaneDelcroix StephaneDelcroix moved this from Changes Requested to Approved in MAUI SDK Ongoing Jan 7, 2026
PureWeen pushed a commit that referenced this pull request Jan 9, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
PureWeen pushed a commit that referenced this pull request Jan 13, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
github-actions bot pushed a commit that referenced this pull request Jan 16, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
@rmarinho
Copy link
Member

/azp run maui-pr-uitests

@rmarinho
Copy link
Member

/azp run maui-pr-devicetests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

github-actions bot pushed a commit that referenced this pull request Jan 20, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
github-actions bot pushed a commit that referenced this pull request Jan 21, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
@PureWeen PureWeen modified the milestones: .NET 10.0 SR4, .NET 10 SR5 Jan 21, 2026
github-actions bot pushed a commit that referenced this pull request Jan 23, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
PureWeen pushed a commit that referenced this pull request Jan 23, 2026
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
The load-time handling of the `IsEnabled` property for tab items was not
implemented on iOS. As a result, disabled tabs could still be selectable
and navigateable
### Description of Change
Updated `ShellItemRenderer.cs` to set the `IsEnabled` property of each
`TabBar` item based on the corresponding `IsEnabled` value during both
initial creation and when the items collection changes.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #33158 

### Follow-up PR :  

- On **iOS 26** and **Catalyst 26**, navigation between tabs via drag
and selection gestures is handled separately in this PR
#33337.

### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/d133ccd3-abb1-44dd-9135-16b1ebeeb8e6">
| <video
src="https://github.com/user-attachments/assets/223f454c-fc1a-4167-b265-8ef6c7e0c8c6">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
@rmarinho rmarinho merged commit 5c4b066 into dotnet:main Jan 31, 2026
153 of 161 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Jan 31, 2026
kubaflo pushed a commit to kubaflo/maui that referenced this pull request Feb 2, 2026
dotnet#33337)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause 
On iOS and Mac Catalyst 26 version, drag and selection gestures allow
navigation to disabled tabs which leads to inconsistent with the UI and
expected behavior.
### Description of Change
* Since navigation can be achieved via drag and select in iOS and Mac
Catalyst version 26, updated the `ShouldSelectViewController` logic in
`ShellItemRenderer.cs` to prevent selection of disabled tabs on iOS and
Mac Catalyst by returning `false` when a tab's `IsEnabled` property is
`false`.
<!-- Enter description of the fix in this section -->

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes dotnet#33158 
### Tested the behavior in the following platforms

- [ ] Windows
- [x] Android
- [x] iOS
- [x] Mac

Follow UP PR : [33369](dotnet#33369)

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video
src="https://github.com/user-attachments/assets/837f9197-4f92-4797-8b4a-5f40cc0f2af2">
| <video
src="https://github.com/user-attachments/assets/89449bc0-bd23-4f10-8bbd-102cce85f64e">
|
<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios platform/macos macOS / Mac Catalyst version/iOS-26

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Catalyst] TabBarBackgroundColor, TabBarUnselectedColor, and IsEnabled Not Working as Expected in Shell

5 participants