Skip to content

Commit 56f27f1

Browse files
PureWeengithub-actions
authored andcommitted
Revert "[Android & iOS] Fix for SearchHandler Character Spacing Property (#29497)"
This reverts commit 9827339. # Conflicts: # src/Controls/src/Core/Compatibility/Handlers/Shell/Android/SearchHandlerAppearanceTracker.cs # src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/SearchHandlerAppearanceTracker.cs # src/Controls/tests/TestCases.HostApp/Issues/Issue29492.cs # src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29492.cs
1 parent 192ded9 commit 56f27f1

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/SearchHandlerAppearanceTracker.cs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -114,31 +114,7 @@ void SearchHandlerPropertyChanged(object sender, System.ComponentModel.PropertyC
114114
else if (e.Is(SearchHandler.VerticalTextAlignmentProperty))
115115
{
116116
UpdateSearchBarVerticalTextAlignment(_uiSearchBar.FindDescendantView<UITextField>());
117-
}
118-
else if (e.Is(SearchHandler.CharacterSpacingProperty))
119-
{
120-
UpdateCharacterSpacing(_uiSearchBar.FindDescendantView<UITextField>());
121-
}
122-
}
123-
124-
void UpdateCharacterSpacing(UITextField textField)
125-
{
126-
if (textField is null)
127-
{
128-
return;
129-
}
130-
131-
var attributedText = textField.AttributedText?.WithCharacterSpacing(_searchHandler.CharacterSpacing);
132-
if (attributedText is not null)
133-
{
134-
textField.AttributedText = attributedText;
135-
}
136-
137-
var placeholderAttributedText = textField.AttributedPlaceholder?.WithCharacterSpacing(_searchHandler.CharacterSpacing);
138-
if (placeholderAttributedText is not null)
139-
{
140-
textField.AttributedPlaceholder = placeholderAttributedText;
141-
}
117+
}
142118
}
143119

144120
void GetDefaultSearchBarColors(UISearchBar searchBar)

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29492.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if TEST_FAILS_ON_WINDOWS // Windows Character Spacing Issue Link - https://github.com/dotnet/maui/issues/29493
1+
#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_IOS // Windows Character Spacing Issue Link - https://github.com/dotnet/maui/issues/29493
22
using NUnit.Framework;
33
using UITest.Appium;
44
using UITest.Core;

0 commit comments

Comments
 (0)