Provide a keyboard interactions property so scrollable views can influence closing soft keyboard on scroll
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
### Description
### Description
When the SoftKeyboard is visible, and the user starts scrolling there are a couple different ways the keyboard can react.
- StayOpen: Keyboard stays open
- CloseWithDownScroll: Keyboard immediately closes when scrolling down
- FollowDownScroll: Keyboard follows scroll position (I think this is only possible on iOS)
### Additional thoughts
- Should we also add APIS for `Up Scroll`
- If we add a KeyboardManager so users can open/close/position the keyboard themselves then do we even need this behavior?
### (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
```C#
public enum KeyboardScrollInteraction
{
Default, StayOpen, CloseWhenScrollingDown, FollowWhenScrollingDown
}
```
### Usage Scenarios
# XAML Example
```XAML
```
### Backward Compatibility
N/A
### Difficulty
High
Contributor guide
Research direction
Start by reviewing the proposed IScrollableKeyboardInteraction interface and KeyboardScrollInteraction enum alongside the ScrollView, CarouselView, and CollectionView APIs named in the issue. Compare the requested StayOpen, CloseWhenScrollingDown, and FollowWhenScrollingDown behaviors across supported platforms; done means the public API and its scrolling behavior are consistently defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100