Commit 561aa8a
authored
[iOS/macCatalyst] [Candidate Fix] Editor shadow and theme regression caused by BackgroundColor reset on initial handler connection (#35343)
<!-- 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!
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Root Cause of the Regression
PR #34741's MapBackground overrides call platformView.BackgroundColor =
null during initial handler connection (when Background is null by
default), making Editor controls transparent at startup — breaking
shadow rendering and app-theme color bindings.
### Description of Change
In EditorHandler.iOS.cs, replaced platformView.BackgroundColor = null
with platformView.BackgroundColor = ColorExtensions.BackgroundColor
(UIColor.SystemBackground) so the Editor restores the system's adaptive
default color instead of becoming transparent. This preserves shadow
rendering on initial load and correctly responds to light/dark theme
changes.
### Issues Fixed
UI Test
iOS:
VerifyEditorPlaceholderWithShadow, VerifyEditor_WithShadow,
ShadowsDontRespectControlShape
Mac:
VerifyEditorPlaceholderWithShadow, VerifyEditor_WithShadow,
ShadowsDontRespectControlShape,
EditorAndEntryInputFieldsShouldChangeColorsOnAppThemeChange,
EntryAndEditorPlaceholderTextColorAppThemeBindingUpdatesOnThemeChange,
EntryAndEditorTextColorAppThemeBindingUpdatesOnThemeChange - Fails due
to this PR - #347411 parent f1a5769 commit 561aa8a
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
0 commit comments