[PR #8598] fix: spacebar not working when editing text fields in grid view #8411

Open
opened 2026-03-23 23:24:04 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/8598
Author: @yetval
Created: 3/20/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • 2021d2e fix: space key consumed by ancestor Shortcuts widget before reaching text input; return skipRemainingHandlers on focusNode to stop propagation without suppressing WM_CHAR
  • 2c32749 fix: only intercept unmodified space to preserve modifier chords

📊 Changes

1 file changed (+11 additions, -0 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/text.dart (+11 -0)

📄 Description

Description

Fixes the spacebar key not working when editing text fields in database grid view on Windows.

Root cause: When a key event is dispatched, Flutter's ancestor Shortcuts widget maps the bare space key to ActivateIntent. When that intent is handled, the engine receives handled: true and suppresses the WM_CHAR message — so the character never reaches the text input system.

Fix: Set onKeyEvent on the text cell's focusNode to return KeyEventResult.skipRemainingHandlers for the space key. This stops ancestor Shortcuts from seeing the event without marking it as "handled", so the platform still generates WM_CHAR and the space is inserted normally.

Closes #8572

Checklist

  • Code follows AppFlowy's conventions
  • At least one related issue is referenced
  • Tests included (UI key event test)
  • Existing tests pass

Summary by Sourcery

Bug Fixes:

  • Prevent the grid text editor from swallowing spacebar presses by skipping remaining key handlers for the space key.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/8598 **Author:** [@yetval](https://github.com/yetval) **Created:** 3/20/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`2021d2e`](https://github.com/AppFlowy-IO/AppFlowy/commit/2021d2e604182f5a4e32ac6f9c130750e98e3dbb) fix: space key consumed by ancestor Shortcuts widget before reaching text input; return skipRemainingHandlers on focusNode to stop propagation without suppressing WM_CHAR - [`2c32749`](https://github.com/AppFlowy-IO/AppFlowy/commit/2c32749fcfebe1fbb97fb4b89b5bf18df2a4ab74) fix: only intercept unmodified space to preserve modifier chords ### 📊 Changes **1 file changed** (+11 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/text.dart` (+11 -0) </details> ### 📄 Description ## Description Fixes the spacebar key not working when editing text fields in database grid view on Windows. **Root cause:** When a key event is dispatched, Flutter's ancestor `Shortcuts` widget maps the bare space key to `ActivateIntent`. When that intent is handled, the engine receives `handled: true` and suppresses the `WM_CHAR` message — so the character never reaches the text input system. **Fix:** Set `onKeyEvent` on the text cell's `focusNode` to return `KeyEventResult.skipRemainingHandlers` for the space key. This stops ancestor Shortcuts from seeing the event without marking it as "handled", so the platform still generates `WM_CHAR` and the space is inserted normally. Closes #8572 ## Checklist - [x] Code follows AppFlowy's conventions - [x] At least one related issue is referenced - [ ] Tests included (UI key event test) - [x] Existing tests pass ## Summary by Sourcery Bug Fixes: - Prevent the grid text editor from swallowing spacebar presses by skipping remaining key handlers for the space key. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#8411
No description provided.