fix: TaskList cannot be added on mobile

This commit is contained in:
thecodrr
2022-06-04 20:54:35 +05:00
parent 3a886b6205
commit 2cf2d286ca
2 changed files with 2 additions and 2 deletions

View File

@@ -243,5 +243,5 @@ var tasklist = function (editor) { return ({
title: "Task list",
icon: "checkbox",
isChecked: editor === null || editor === void 0 ? void 0 : editor.isActive("taskList"),
onClick: function () { return editor === null || editor === void 0 ? void 0 : editor.chain().toggleTaskList().run(); },
onClick: function () { return editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleTaskList().run(); },
}); };

View File

@@ -305,5 +305,5 @@ const tasklist = (editor: Editor | null): MenuItem => ({
title: "Task list",
icon: "checkbox",
isChecked: editor?.isActive("taskList"),
onClick: () => editor?.chain().toggleTaskList().run(),
onClick: () => editor?.chain().focus().toggleTaskList().run(),
});