Skip to content

Commit

Permalink
fix(TextBox): [iOS] Add temporary workaround for iOS 16 on selection …
Browse files Browse the repository at this point in the history
…with UITextField

This change is needed to make the SinglelineTextBoxView.SelectedTextRange conditional, and avoid changing the value provided to UIKit. This breaks the use of `TextBoxSelectionChanged`, but can be restored by using the `FeatureConfiguration.TextBox.IOS16EnableSelectionSupport` feature flag if the issue ends up being fixed in UIKit. See #9430 for more details.
  • Loading branch information
jeromelaban committed Aug 12, 2022
1 parent 5502f73 commit b6764fc
Show file tree
Hide file tree
Showing 3 changed files with 254 additions and 208 deletions.
10 changes: 10 additions & 0 deletions src/Uno.UI/FeatureConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ public static class TextBlock

public static class TextBox
{

/// <summary>
/// Determines if the caret is visible or not.
/// </summary>
Expand All @@ -451,6 +452,15 @@ public static class TextBox
/// </remarks>
public static bool UseLegacyInputScope { get; set; }
#endif

#if __IOS__
/// <summary>
/// As of iOS 16 Beta 4, the selection events are crashing the application. This feature configuration is added
/// to provide the ability to restore the original behavior if/when the underlying UIKit is fixed.
/// See https://github.com/unoplatform/uno/issues/9430 for additional details.
/// </summary>
public static bool IOS16EnableSelectionSupport { get; set; }
#endif
}

public static class ScrollViewer
Expand Down
Loading

0 comments on commit b6764fc

Please sign in to comment.