-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header Selection Dropdown opens under keyboard and is not visible #1697
Comments
I have encountered this issue before and I think maybe it's related to flutter itself? I'm not sure but the easiest solution would be to replace the dropdown widget with different one |
I think there are two possible solutions.
I just dont know if its possible to control in what direction the dropdown should open that easily. |
I ran into this as well. I had to roll back to the 8.x quill editor which doesn't have this issue because it doesn't use a popupmenu. Here are some screenshots for reference. I think (?) the regular Flutter behavior is for the popup menu to expand upwards when at the bottom of the screen or when keyboard is showing. For some reason when there is no keyboard the popupmenu does expand upward, but when keyboard is visible it expands downward underneath the keyboard. |
Has anyone found a workaround to this at all? Still blocking me from upgrading to the latest flutter-quill. I guess a workaround is to just move the toolbar to the top of screen vs bottom. I tried to look myself but couldn't work it out, if anyone else wants to look, I believe it's to do with the Also related Flutter issue I found: |
Any update on this issue? |
@ellet0 I notice something about this error. To fix this, the number of elements in the |
A solution: warp a OverlayBoundary Widget
import 'package:flutter/material.dart';
class OverlayBoundary extends StatefulWidget {
const OverlayBoundary({super.key, required this.child});
final Widget child;
@override
State<OverlayBoundary> createState() => _OverlayBoundaryState();
}
class _OverlayBoundaryState extends State<OverlayBoundary> {
late final OverlayEntry _overlayEntry = OverlayEntry(builder: (context) => widget.child);
@override
void didUpdateWidget(covariant OverlayBoundary oldWidget) {
super.didUpdateWidget(oldWidget);
_overlayEntry.markNeedsBuild();
}
@override
Widget build(BuildContext context) {
return Overlay(
initialEntries: [_overlayEntry],
);
}
} Workaround
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: const Text('Note'),
),
body: OverlayBoundary( // <====== this
child: Column(
children: <Widget>[
Expanded(
child: QuillEditor.basic(
controller: _controller,
configurations: const QuillEditorConfigurations(),
),
),
quillSimpleToolbar,
],
),
),
);
} |
This comment has been minimized.
This comment has been minimized.
Glad to hear it's fixed, a workaround hardly fixes this issue, will need more time to see if it's a flutter issue. See Flutter #142921 |
The OverlayBoundary workaround does not work properly anymore on the latest Flutter version. The dropdown is way to high up when the keyboard is closed or partialy behind the toolbar and keyboard when the keyboard is up. @EchoEllet It could be this Flutter issue but it seems that now no workaround works anymore. |
Will likely avoid using |
Sounds good. Do you have a rough estimate of when v11 will be released? |
See #2422 for the issues that must be fixed before releasing it as stable. You can use it now. The pre-release is not buggy or experimental. We expect a few more breaking changes that will be documented in CHANGELOG and the migration guide. |
This is an issue in Flutter version 3.27. It has been fixed in the master branch. The reason is that in Flutter 3.27, menus pop were forcibly attached to the root overlay, which is clearly unreasonable. |
Could this also be related? |
Is there an existing issue for this?
Flutter Quill version
No response
Steps to reproduce
Expected results
Dropdown opens to the top
Actual results
Dropdown opens to the bottom below the keyboard
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
The text was updated successfully, but these errors were encountered: