Commit Graph

10 Commits

Author SHA1 Message Date
Saul-Mirone 7eb6b268a6 fix(editor): auto focus between tab switch (#12572)
Closes: BS-2290

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Bug Fixes**
  - Improved focus behavior when switching between tabs to prevent unwanted automatic focusing of the content-editable area.
  - Enhanced selection clearing to avoid unnecessary blurring when the main editable element is already focused.
  - Refined focus checks in tests to specifically target contenteditable elements, ensuring more accurate validation of focus behavior.
  - Adjusted test assertions for block selection to be less strict and removed redundant blur operations for smoother test execution.
  - Updated toolbar dropdown closing method to use keyboard interaction for better reliability.
- **New Features**
  - Added a recoverable property to selection types, improving selection state management and recovery.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-27 13:38:02 +00:00
Saul-Mirone 388641bc89 refactor(editor): rename doc to store on block components (#12173)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Refactor**
  - Unified internal data access by replacing all references from `doc` to `store` across all components, blocks, widgets, and utilities. This affects how readonly state, block operations, and service retrieval are handled throughout the application.
- **Tests**
  - Updated all test utilities and test cases to use `store` instead of `doc` for document-related operations.
- **Chores**
  - Updated context providers and property names to reflect the change from `doc` to `store` for improved consistency and maintainability.

No user-facing features or behaviors have changed.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-08 01:01:05 +00:00
Yifeng Wang 16f7be7f0b perf(editor): avoid redundant dom query when editing single block (#11732) 2025-04-16 17:52:22 +08:00
doodlewind b21864cf63 perf(editor): dispose input event handler for removed blocks (#11734) 2025-04-16 09:05:47 +00:00
Saul-Mirone bda5562f90 fix(editor): allow copy in readonly mode (#11538) 2025-04-08 08:52:20 +00:00
Saul-Mirone c306d98370 fix(editor): range sync in lit portal (#11490)
Closes: BS-3032
2025-04-07 05:38:20 +00:00
fundon a1500e3ee1 fix(editor): textarea not focusing in AI panel (#11429)
Closes: [BS-3006](https://linear.app/affine-design/issue/BS-3006/insider上面,圈选yuan素后,ad-hoc的ai对话框焦点控制有大问题(无法对焦,总是会跳走))
2025-04-03 03:27:26 +00:00
Saul-Mirone 7f98420061 chore: allow cursor in none-contenteditable blocks (#11366) 2025-04-01 13:20:08 +00:00
Saul-Mirone 58d6a96e45 fix(editor): firefox invalid selection range (#11320)
Closes: BS-2987
2025-03-31 14:33:24 +00:00
Saul-Mirone 205cd7a86d refactor(editor): rename block-std to std (#11250)
Closes: BS-2946
2025-03-28 07:20:34 +00:00