google / accompanist

A collection of extension libraries for Jetpack Compose

Home Page:https://google.github.io/accompanist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TextField context menu overlaps Keyboard

jannisveerkamp opened this issue · comments

Describe the bug

When using the Insets library the system context menu can scroll over the keyboard.

To Reproduce

Steps to reproduce the behavior:

  1. Use WindowCompat.setDecorFitsSystemWindows(window, false) + ProvideWindowInsets + the .navigationBarsWithImePadding() Modifier
  2. Use a scrollable TextField with a long text.
  3. Scroll down the text and select it via Longpress (the system context menu opens)
  4. Now scroll up again
  5. The Context menu overlaps the Keyboard

Expected behavior

The Context menu overlaps the Keyboard. Without the Insets Library the Context Menu will just vanish.

Video

android_context_menu_keyboard_overlap.mp4

I've also created a sample project to reproduce the bug: https://github.com/jannisveerkamp/composebugreporter

Environment:

  • Android OS version: Every. I used Android 11 and 12
  • Device: Every. I used a Samsung S21
  • Accompanist version: 0.20.2, same behavior in the latest beta

Additional context

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sadly the issue was closed within my holidays. But it's still relevant.