Skip to content

Commit

Permalink
Merge pull request #3288 from nextcloud/fix/1525
Browse files Browse the repository at this point in the history
TaskItem: Don't allow toggling while editor is readonly
  • Loading branch information
mejo- authored Nov 2, 2022
2 parents 308d945 + d5fe1d5 commit ded6b61
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/nodes/TaskItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ const TaskItem = TipTapTaskItem.extend({
const isListClicked = event.target.tagName.toLowerCase() === 'li'
if (!isListClicked
|| !parentList
|| parentList.node.type !== schema.nodes.taskItem) {
|| parentList.node.type !== schema.nodes.taskItem
|| !view.editable) {
return
}
const tr = state.tr
Expand Down

0 comments on commit ded6b61

Please sign in to comment.