refactor: rewrite dblclick and selection logic of default-tool (#11036)

continue #10824

### Changed
- Moved double-click-to-edit behavior from the default tool to individual model views
- Introduced `onSelected` callback interface in gfx view components to allows developers to override default selection logic
This commit is contained in:
doouding
2025-03-26 07:32:43 +00:00
parent 61c0d01da3
commit ace5d44a61
38 changed files with 779 additions and 353 deletions
@@ -166,7 +166,7 @@ export class TestAffineEditorContainer extends SignalWatcher(
override firstUpdated() {
if (this.mode === 'page') {
setTimeout(() => {
if (this.autofocus) {
if (this.autofocus && this.mode === 'page') {
const richText = this.querySelector('rich-text');
const inlineEditor = richText?.inlineEditor;
inlineEditor?.focusEnd();