Skip to content

Commit f0e1216

Browse files
committed
fix: remove KeyboardListener causing extra Tab stop in focus traversal
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.
1 parent e14689b commit f0e1216

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
1111
## [Unreleased]
1212

13+
### Fixed
14+
15+
- **[Web]** Remove unnecessary `KeyboardListener` that was causing an extra Tab stop in focus traversal, improving keyboard navigation efficiency.
16+
1317
### Added
1418

1519
- Added localization support for `mn` (Mongolian, Mongolia)

lib/src/editor/editor.dart

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -340,20 +340,6 @@ class QuillEditorState extends State<QuillEditor>
340340
)
341341
: child;
342342

343-
if (kIsWeb) {
344-
// Intercept RawKeyEvent on Web to prevent it from propagating to parents
345-
// that might interfere with the editor key behavior, such as
346-
// SingleChildScrollView. Thanks to @wliumelb for the workaround.
347-
// See issue https://github.com/singerdmx/flutter-quill/issues/304
348-
return KeyboardListener(
349-
onKeyEvent: (_) {},
350-
focusNode: FocusNode(
351-
onKeyEvent: (node, event) => KeyEventResult.skipRemainingHandlers,
352-
),
353-
child: editor,
354-
);
355-
}
356-
357343
return editor;
358344
}
359345

0 commit comments

Comments
 (0)