fix(editor): close embed edit modal on editor unmount (#9765)

Close [BS-2436](https://linear.app/affine-design/issue/BS-2436/should-close-embed-card-edit-modal-after-editor-unmount)

### What Changes:
- fix(editor): close embed edit modal on editor unmount
- test(editor): add test to embed edit modal when switching mode
This commit is contained in:
L-Sun
2025-01-17 11:53:09 +00:00
parent df910d7013
commit d8727c2001
2 changed files with 43 additions and 0 deletions
@@ -279,6 +279,7 @@ export class EmbedCardEditModal extends SignalWatcher(
override connectedCallback() {
super.connectedCallback();
this.disposables.add(this.host.slots.unmounted.on(this._hide));
this._updateInfo();
}