Skip to content

Enabled Semantics breaks typing Text in editor #2699

@ramakrishnamrajubrane

Description

@ramakrishnamrajubrane

Have you checked for an existing issue?

Flutter Quill Version

flutter_quill: ^11.5.0

Steps to Reproduce

Widget _buildCompactContent() {
// Set readOnly state on controller
_controller.readOnly = widget.isReadOnly || widget.isDisabled;

return Padding(
  padding: EdgeInsets.all(8.0),
  child: TextSelectionTheme(
    data: TextSelectionThemeData(
      selectionColor: _primaryBlue.withOpacity(0.3),
      selectionHandleColor: _primaryBlue,
      cursorColor: widget.cursorColor ?? _primaryBlue,
    ),
    child: QuillEditor.basic(
      controller: _controller,
      focusNode: _focusNode,
      config: QuillEditorConfig(
        autoFocus: false,
        expands: false,
        padding: EdgeInsets.zero,
        placeholder: 'Type Here',
        enableInteractiveSelection: true,
        onTapDown: (details, p1) {
          if (!_focusNode.hasFocus) {
            _focusNode.requestFocus();
          }
          return true;
        },
        customStyles: DefaultStyles(
          paragraph: DefaultTextBlockStyle(
            TextStyle(
              color: widget.textColor,
              fontSize: widget.fontSize,
              fontFamily: widget.fontFamily,
            ),
            HorizontalSpacing(0, 0),
            VerticalSpacing(0, 0),
            VerticalSpacing(0, 0),
            null,
          ),
          // Add styles for all other block types to ensure text color is applied
          h1: DefaultTextBlockStyle(
            TextStyle(
              color: widget.textColor,
              fontSize: widget.fontSize * 2,
              fontFamily: widget.fontFamily,
              fontWeight: FontWeight.bold,
            ),
            HorizontalSpacing(0, 0),
            VerticalSpacing(0, 0),
            VerticalSpacing(0, 0),
            null,
          ),
          h2: DefaultTextBlockStyle(
            TextStyle(
              color: widget.textColor,
              fontSize: widget.fontSize * 1.5,
              fontFamily: widget.fontFamily,
              fontWeight: FontWeight.bold,
            ),
            HorizontalSpacing(0, 0),
            VerticalSpacing(0, 0),
            VerticalSpacing(0, 0),
            null,
          ),
          h3: DefaultTextBlockStyle(
            TextStyle(
              color: widget.textColor,
              fontSize: widget.fontSize * 1.25,
              fontFamily: widget.fontFamily,
              fontWeight: FontWeight.bold,
            ),
            HorizontalSpacing(0, 0),
            VerticalSpacing(0, 0),
            VerticalSpacing(0, 0),
            null,
          ),
        ),
      ),
    ),
  ),
);

}
when added SemanticsBinding.instance.ensureSemantics() this the editor is not working

Expected results

Unable to edit the the editor

Actual results

it is working in mobile but i am facing this issue in web

Additional Context

Screenshots / Video demonstration

[Attach media here]

Logs
[Paste logs here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions