Don't wrap the QuillEditor's child in the EditorTextSelectionGestureDetector if selection is disabled (#890)

pull/895/head
Alex Isaienko 3 years ago committed by GitHub
parent 033bce001c
commit 0770923301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      lib/src/widgets/editor.dart

@ -498,11 +498,14 @@ class QuillEditorState extends State<QuillEditor>
);
final editor = I18n(
initialLocale: widget.locale,
child: _selectionGestureDetectorBuilder.build(
behavior: HitTestBehavior.translucent,
child: child,
));
initialLocale: widget.locale,
child: selectionEnabled
? _selectionGestureDetectorBuilder.build(
behavior: HitTestBehavior.translucent,
child: child,
)
: child,
);
if (kIsWeb) {
// Intercept RawKeyEvent on Web to prevent it from propagating to parents

Loading…
Cancel
Save