-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: edgeless note preview on the editor settings is editable (#8735)
Fix issue [BS-1779](https://linear.app/affine-design/issue/BS-1779). The attribute `contenteditable` will be `true` if the document is not read-only. In this case, the note preview can be focused on and users can edit the note content. But we can not simply make the document read-only. If the user changes the editor settings, we also need to update the document model, which requires that the document is not read-only. Thus following code sets the document editable before the model updates and resets the document to read-only after the model is updated.
- Loading branch information
Showing
3 changed files
with
16 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters