Skip to content

fix: prevent toolbar flicker when tapping a checklist checkbox#2747

Open
Alspb wants to merge 1 commit into
singerdmx:masterfrom
Alspb:fix/toolbar-flicker-on-checkbox-tap
Open

fix: prevent toolbar flicker when tapping a checklist checkbox#2747
Alspb wants to merge 1 commit into
singerdmx:masterfrom
Alspb:fix/toolbar-flicker-on-checkbox-tap

Conversation

@Alspb

@Alspb Alspb commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes a brief toolbar flicker when tapping a checklist checkbox, and retires the internal QuillController.toolbarButtonToggler workaround by deprecating it rather than removing it.

Current behavior: Tapping a checklist checkbox also fires the editor's tap gesture (onSingleTapUp → selectPosition), which moves the caret to the tapped line for one frame. The toolbar briefly reflects that line's style — the header, inline, and color buttons flicker — before _handleCheckboxTap's post-frame restore puts the selection back. The checklist button additionally flashes because formatText stages the checked/unchecked attribute into toggledStyle, which getSelectionStyle() merges.

New behavior: The gesture-driven selection change from the checkbox tap is ignored (_ignoreCheckboxTapSelectionChange), so the caret — and the toolbar — stay put. The checkbox is formatted silently (shouldNotifyListeners: false) so the staged toggledStyle doesn't momentarily light up the checklist button; the
existing post-frame updateSelection emits a single clean notification.

This removes the need for the old toolbarButtonToggler workaround, so its consumers (header buttons/dropdown, checklist button, line-height dropdown) are removed.
The field itself is public but undocumented and internal-only; instead of hard-removing it (a breaking change in a minor release), it's kept as a @Deprecated, @internal no-op and scheduled for removal in a future version.

Type of Change

  • Feature: New functionality without breaking existing features.
  • 🛠️ Bug fix: Resolves an issue without altering current behavior.
  • 🧹 Refactor: Code reorganization, no behavior change.
  • Breaking: Alters existing functionality and requires updates.
  • 🧪 Tests: New or modified tests
  • 📝 Documentation: Updates or additions to documentation.
  • 🗑️ Chore: Routine tasks, or maintenance.
  • Build configuration change: Build/configuration changes.

Copilot AI review requested due to automatic review settings June 29, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants