refactor(editor): remove readonly in awareness (#9597)
This commit is contained in:
@@ -3,6 +3,7 @@ import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import type { RichText, RootBlockModel } from '@blocksuite/blocks';
|
||||
import { assertExists, WithDisposable } from '@blocksuite/global/utils';
|
||||
import type { Store } from '@blocksuite/store';
|
||||
import { effect } from '@preact/signals-core';
|
||||
import { css, html } from 'lit';
|
||||
import { property, query, state } from 'lit/decorators.js';
|
||||
|
||||
@@ -111,7 +112,7 @@ export class DocTitle extends WithDisposable(ShadowlessElement) {
|
||||
|
||||
this._isReadonly = this.doc.readonly;
|
||||
this._disposables.add(
|
||||
this.doc.awarenessStore.slots.update.on(() => {
|
||||
effect(() => {
|
||||
if (this._isReadonly !== this.doc.readonly) {
|
||||
this._isReadonly = this.doc.readonly;
|
||||
this.requestUpdate();
|
||||
|
||||
Reference in New Issue
Block a user