dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.98k stars 1.71k forks source link

Provide a keyboard interactions property so scrollable views can influence closing soft keyboard on scroll #11983

Open PureWeen opened 1 year ago

PureWeen commented 1 year ago

Description

Description

When the SoftKeyboard is visible, and the user starts scrolling there are a couple different ways the keyboard can react.

Additional thoughts

(Public) API Changes

IScrollableKeyboardInteraction

Add this interface to any container that's capable of scrolling ScrollView, CarouselView,CollectionView`

Properties

API Description
SoftKeyboardScrollInteraction Gets or sets keyboard interaction when scrolling content.

KeyboardScrollInteraction

public enum KeyboardScrollInteraction
{
     Default, StayOpen, CloseWhenScrollingDown, FollowWhenScrollingDown
}

Usage Scenarios

XAML Example

<ScrollView SoftKeyboardScrollInteraction ="CloseWithDownScroll">
   <VerticalStackLayout>
        <Entry/>
        <Entry/>
        <Entry/>

Backward Compatibility

N/A

Difficulty

High

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

LeeWhite187 commented 1 year ago

Having a fully controllable/configurable soft-keyboard is a major need in MAUI, for any developer hoping to include real chat functionality (beyond unstable, hobby, or POC level) in a MAUI/Xamarin app. So, I find it disappointing that such a historically well-blogged "functionality miss" in Xamarin, would be a back-burner issue for MAUI.

With the easily searchable Xamarin blog posts of workarounds and platform code, to achieve parity-seeking functionality and behavior of the soft-keyboard in chat window type views, it is disappointing that Microsoft would back-burner this issue, when the respective Xamarin soft-keyboard functionality has been historically wrong, tying soft-keyboard presence to the editor control focus by default, and always requiring platform code and hacks to make it persist and behave the same as a native chat app would.

I apologize if this ruffles any developer feathers. I know the developers are working diligently to fix problems.