Fix pill-shaped focus ring on macOS 26#35393
Merged
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35393Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35393" |
Open
3 tasks
This was referenced May 15, 2026
This was referenced May 19, 2026
Contributor
|
/review -b feature/regression-check -p ios |
kubaflo
requested changes
May 19, 2026
kubaflo
left a comment
Contributor
There was a problem hiding this comment.
Could you pleas review the failing tests?
Contributor
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced May 19, 2026
Closed
Contributor
|
/review -b feature/regression-check -p ios |
This was referenced May 20, 2026
Contributor
|
/review -b feature/regression-check -p ios |
Contributor
|
/azp run maui-pr-uitests , maui-pr-devicetests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
kubaflo
approved these changes
May 21, 2026
This was referenced May 21, 2026
This was referenced May 22, 2026
Contributor
|
/review -b feature/refactor-copilot-yml |
MauiBot
reviewed
May 24, 2026
MauiBot
left a comment
Collaborator
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
…/iOS 26+ Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/azp run maui-pr-uitests , maui-pr-devicetests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
This was referenced May 25, 2026
PureWeen
pushed a commit
that referenced
this pull request
Jun 2, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details: Entry/Picker focus outline is misaligned with the control border, border radius of focus outline is too large ### Root Cause: On macOS (Liquid Glass), Apple changed UIKit so that a UITextField with BorderStyle = RoundedRect renders its keyboard focus ring as a fully rounded pill/capsule shape — instead of following the field's actual corner radius. This is the new UIFocusHaloEffect behavior introduced in the Liquid Glass design language (WWDC 2025). ### Description of change: Overrode LayoutSubviews() in MauiTextField and NoCaretField to set a custom UIFocusHaloEffect whose path is a UIBezierPath.FromRoundedRect(Bounds, 5f). This matches UIKit's own RoundedRect corner radius so the halo aligns with the grey border. ### Validated the behaviour in the following platforms - [ ] Android - [ ] Windows - [ ] iOS - [x] Mac ### Fixes Fixes #34899 ### Screenshots | Before | After | |---------|--------| | <video src="https://github.com/user-attachments/assets/5b76f345-0af2-4d35-84d6-855bac2d1a70"> | <video src="https://github.com/user-attachments/assets/4d485a92-3bf0-48be-99c5-c351040ce373"> | --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen
pushed a commit
that referenced
this pull request
Jun 11, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details: Entry/Picker focus outline is misaligned with the control border, border radius of focus outline is too large ### Root Cause: On macOS (Liquid Glass), Apple changed UIKit so that a UITextField with BorderStyle = RoundedRect renders its keyboard focus ring as a fully rounded pill/capsule shape — instead of following the field's actual corner radius. This is the new UIFocusHaloEffect behavior introduced in the Liquid Glass design language (WWDC 2025). ### Description of change: Overrode LayoutSubviews() in MauiTextField and NoCaretField to set a custom UIFocusHaloEffect whose path is a UIBezierPath.FromRoundedRect(Bounds, 5f). This matches UIKit's own RoundedRect corner radius so the halo aligns with the grey border. ### Validated the behaviour in the following platforms - [ ] Android - [ ] Windows - [ ] iOS - [x] Mac ### Fixes Fixes #34899 ### Screenshots | Before | After | |---------|--------| | <video src="https://github.com/user-attachments/assets/5b76f345-0af2-4d35-84d6-855bac2d1a70"> | <video src="https://github.com/user-attachments/assets/4d485a92-3bf0-48be-99c5-c351040ce373"> | --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details:
Entry/Picker focus outline is misaligned with the control border, border radius of focus outline is too large
Root Cause:
On macOS (Liquid Glass), Apple changed UIKit so that a UITextField with BorderStyle = RoundedRect renders its keyboard focus ring as a fully rounded pill/capsule shape — instead of following the field's actual corner radius. This is the new
UIFocusHaloEffect behavior introduced in the Liquid Glass design language (WWDC 2025).
Description of change:
Overrode LayoutSubviews() in MauiTextField and NoCaretField to set a custom UIFocusHaloEffect whose path is a UIBezierPath.FromRoundedRect(Bounds, 5f). This matches UIKit's own RoundedRect corner radius so the halo aligns with the grey border.
Validated the behaviour in the following platforms
Fixes
Fixes #34899
Screenshots
34899_BeforeFix.mov
34899_AfterFix.mov