html-editor-enhanced
html-editor-enhanced copied to clipboard
[BUG] Editor take the focus instead of a dialog that overlay it
Describe the bug
when I have a alertDialog that overlap the editor, the mouse still change to a text cursor and when I click on my dialog the focus go to my editor that is behind it.
To Reproduce Add a button to add a AlertDialog in the main.dart, in this dialog have a IconButton . When clicking on the IconButton, there is no effect.
Expected behavior The focus stay on the dialog
In this screenshot it is impossible to close the dialog by clicking on the close button. If you change the height of the editor to make it smaller , the close button is then clickable...
In the main.dart file example, add:
IconButton( onPressed: () { showDialog( context: context, builder: (BuildContext context) { return AlertDialog( title: SizedBox( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text("Dialog"), IconButton( onPressed: (() { print("Close"); Navigator.pop(context); }), icon: const Icon(Icons.close), ) ], )), scrollable: true, content: SizedBox(), ); }); }, icon: const Icon(Icons.settings), ),
HtmlEditor(....
Any idea how I can solve this problem?
The solution is to use PointerInterceptor in the code invoking the dialog https://pub.dev/packages/pointer_interceptor Still for flutter component where you cannot add this, it cause a problem, like the dateTimePicker open a dialog, and I cannot add this widget inside of it...
same question PointerInterceptor is useful