mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
### TL:DR fix: cannot input space at the beginning of a blank paragraph > CLOSE BS-3427 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved space key handling in the editor: pressing space on an empty AI input now hides the AI panel and inserts a space character back into the editor. - **Bug Fixes** - Prevented the AI panel from processing empty input when space is pressed, ensuring smoother user experience. - **Tests** - Added an end-to-end test verifying that pressing space on an empty AI input hides the AI panel and inserts a space. - **Refactor** - Streamlined event handling logic for space key detection in the editor. - **Chores** - Enhanced editor content retrieval to optionally preserve whitespace while removing invisible characters. <!-- end of auto-generated comment: release notes by coderabbit.ai -->