diff --git a/docs/user-interface/controls/editor.md b/docs/user-interface/controls/editor.md index c2dc3d0f99..befdd066b0 100644 --- a/docs/user-interface/controls/editor.md +++ b/docs/user-interface/controls/editor.md @@ -106,6 +106,8 @@ The following screenshot shows the resulting changes, and the `TextChangedEventArgs` provide the text before and after the change via the `OldTextValue` and `NewTextValue` properties: diff --git a/docs/user-interface/controls/entry.md b/docs/user-interface/controls/entry.md index 89d1ab8275..fcafa63b72 100644 --- a/docs/user-interface/controls/entry.md +++ b/docs/user-interface/controls/entry.md @@ -114,6 +114,8 @@ The following screenshot shows the resulting changes, and the `TextChangedEventArgs` provide the text before and after the change via the `OldTextValue` and `NewTextValue` properties: diff --git a/docs/user-interface/controls/includes/keyboardautomanagerscroll.md b/docs/user-interface/controls/includes/keyboardautomanagerscroll.md new file mode 100644 index 0000000000..602e455c5c --- /dev/null +++ b/docs/user-interface/controls/includes/keyboardautomanagerscroll.md @@ -0,0 +1,11 @@ +--- +ms.topic: include +ms.date: 10/21/2023 +--- + +::: moniker range=">=net-maui-8.0" + +> [!NOTE] +> On iOS, the soft input keyboard can cover a text input field when the field is near the bottom of the screen, making it difficult to enter text. However, in a .NET MAUI iOS app, pages automatically scroll when the soft input keyboard would cover a text entry field, so that the field is above the soft input keyboard. The `KeyboardAutoManagerScroll.Disconnect` method, in the `Microsoft.Maui.Platform` namespace, can be called to disable this default behavior. The `KeyboardAutoManagerScroll.Connect` method can be called to re-enable the behavior after it's been disabled. + +::: moniker-end diff --git a/docs/user-interface/controls/searchbar.md b/docs/user-interface/controls/searchbar.md index d77147aec5..7565cf3b07 100644 --- a/docs/user-interface/controls/searchbar.md +++ b/docs/user-interface/controls/searchbar.md @@ -102,6 +102,8 @@ The equivalent C# code is: SearchBar searchBar = new SearchBar { Placeholder = "Search items..." }; ``` +[!INCLUDE [Keyboard autoscroll manager](includes/keyboardautomanagerscroll.md)] + ## Perform a search with event handlers A search can be executed using the control by attaching an event handler to one of the following events: diff --git a/docs/whats-new/dotnet-8.md b/docs/whats-new/dotnet-8.md index 950dedee4a..5b9ab0ca38 100644 --- a/docs/whats-new/dotnet-8.md +++ b/docs/whats-new/dotnet-8.md @@ -55,6 +55,7 @@ The following behavior has changed from the previous release: - Use of the control from XAML now requires the following `xmlns` namespace declaration: `xmlns:maps="http://schemas.microsoft.com/dotnet/2021/maui/maps"`. - Image caching is disabled on Android when loading an image from a stream with the [`ImageSource.FromStream`](xref:Microsoft.Maui.Controls.ImageSource.FromStream%2A) method. This is due to the lack of data from which to create a reasonable cache key. +- On iOS, pages automatically scroll when the soft input keyboard would cover a text entry field, so that the field is above the soft input keyboard. The `KeyboardAutoManagerScroll.Disconnect` method, in the `Microsoft.Maui.Platform` namespace, can be called to disable this default behavior. The `KeyboardAutoManagerScroll.Connect` method can be called to re-enable the behavior after it's been disabled.