-
-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
Context Menu Appears Behind Keyboard on Android Devices
Description
When using ContextMenuWidget on Android devices, the context menu appears behind the on-screen keyboard when it's open, making the menu items inaccessible to users. This creates a poor user experience as users cannot interact with the context menu options.
Steps to Reproduce
- Open a Flutter app with a text input field on an Android device
- Tap on the text field to open the keyboard
- Long press on a
ContextMenuWidgetto trigger the context menu - Observe that the context menu appears behind the keyboard, making it inaccessible
Expected Behavior
The context menu should:
- Appear above the keyboard when it's open
- Automatically adjust its position to remain visible
- Be fully accessible to users regardless of keyboard state
-After the closing context menu should be reopening the keyboard
Current Behavior
- Context menu appears behind the keyboard
- Menu items are not accessible when keyboard is open
- Users must dismiss the keyboard to access context menu options
Environment
- Package Version:
super_context_menu: ^0.9.1 - Flutter Version:
3.24.0(or latest) - Platform: Android
- Android Version: Tested on Android 12+ (API level 31+)
- Device Models: Various Android devices
Code Example
ContextMenuWidget(
menuProvider: (context) => Menu(
children: [
MenuAction(
title: 'Copy',
callback: () {
// Action
},
),
MenuAction(
title: 'Share',
callback: () {
// Action
},
),
],
),
child: Container(
// Your widget content
),
)Related Issues
This issue is similar to other Flutter context menu problems reported in:
- [super_context_menu]Mobile keyboard cover menu #292
- feat: Improved keyboard behaviour on Android #397
Additional Context
- This issue specifically affects Android devices
- iOS devices don't seem to have this problem
- The issue occurs with both
ContextMenuWidgetand other context menu implementations - This is a common UX problem in mobile apps that needs to be addressed at the package level
Workaround
Currently, developers need to implement custom keyboard detection and positioning logic, which adds complexity and maintenance overhead to their applications.
Priority: High (affects core functionality and user experience)
Labels: bug, android, keyboard, ux, context-menu
Metadata
Metadata
Assignees
Labels
No labels