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
ContextMenuWidget to 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:
Additional Context
- This issue specifically affects Android devices
- iOS devices don't seem to have this problem
- The issue occurs with both
ContextMenuWidget and 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
Context Menu Appears Behind Keyboard on Android Devices
Description
When using
ContextMenuWidgeton 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
ContextMenuWidgetto trigger the context menuExpected Behavior
The context menu should:
-After the closing context menu should be reopening the keyboard
Current Behavior
Environment
super_context_menu: ^0.9.13.24.0(or latest)Code Example
Related Issues
This issue is similar to other Flutter context menu problems reported in:
Additional Context
ContextMenuWidgetand other context menu implementationsWorkaround
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