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( final editor = I18n(
initialLocale: widget.locale, initialLocale: widget.locale,
child: _selectionGestureDetectorBuilder.build( child: selectionEnabled
behavior: HitTestBehavior.translucent, ? _selectionGestureDetectorBuilder.build(
child: child, behavior: HitTestBehavior.translucent,
)); child: child,
)
: child,
);
if (kIsWeb) { if (kIsWeb) {
// Intercept RawKeyEvent on Web to prevent it from propagating to parents // Intercept RawKeyEvent on Web to prevent it from propagating to parents

Loading…
Cancel
Save