Skip to content

Conversation

Ladegeraet
Copy link

Description

This PR removes the web-specific KeyboardListener that was causing inefficient Tab navigation focus on Flutter Web.

Current behavior: On Flutter Web, users need an extra Tab press to reach the Quill editor because a KeyboardListener with a FocusNode creates an additional focus stop in the tab order, making keyboard navigation inefficient.

New behavior: Tab navigation works efficiently across all platforms, allowing users to focus the editor directly without unnecessary extra tab stops.

Motivation: The original KeyboardListener was added as a workaround for issue #304 to prevent key event interference with parent widgets like SingleChildScrollView. However, the original issue could not be reproduced in current Flutter/Quill versions, while the workaround was creating an unnecessary focus traversal step. This change prioritizes efficient keyboard navigation and code simplification.

Alternative solution: If the original issue #304 resurfaces, an alternative approach would be to add skipTraversal: true to the FocusNode instead of removing the entire KeyboardListener.

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.

The web-specific KeyboardListener was creating an unnecessary focus node
that required users to press Tab one extra time to reach the editor.
This change improves keyboard navigation efficiency by removing the
workaround that is no longer needed.
@Ladegeraet Ladegeraet marked this pull request as ready for review September 2, 2025 11:16
Removes unnecessary variable assignment.

Simplifies the conditional return statement within the editor widget for improved readability and efficiency.
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.

1 participant