@tiptap/extension-task-item
Advanced tools
Comparing version 2.0.0-beta.15 to 2.0.0-beta.16
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.0.0-beta.16](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-item@2.0.0-beta.15...@tiptap/extension-task-item@2.0.0-beta.16) (2021-05-27) | ||
### Bug Fixes | ||
* prevent checkbox change when editor isn’t editable, fix [#1386](https://github.com/ueberdosis/tiptap/issues/1386) ([c58a753](https://github.com/ueberdosis/tiptap/commit/c58a753e9442c1766050a1a4733e56d553d2e8c5)) | ||
# [2.0.0-beta.15](https://github.com/ueberdosis/tiptap/compare/@tiptap/extension-task-item@2.0.0-beta.14...@tiptap/extension-task-item@2.0.0-beta.15) (2021-05-18) | ||
@@ -8,0 +19,0 @@ |
@@ -67,4 +67,10 @@ 'use strict'; | ||
checkbox.addEventListener('change', event => { | ||
// if the editor isn’t editable | ||
// we have to undo the latest change | ||
if (!editor.isEditable) { | ||
checkbox.checked = !checkbox.checked; | ||
return; | ||
} | ||
const { checked } = event.target; | ||
if (typeof getPos === 'function') { | ||
if (editor.isEditable && typeof getPos === 'function') { | ||
editor | ||
@@ -71,0 +77,0 @@ .chain() |
@@ -63,4 +63,10 @@ import { Node, mergeAttributes } from '@tiptap/core'; | ||
checkbox.addEventListener('change', event => { | ||
// if the editor isn’t editable | ||
// we have to undo the latest change | ||
if (!editor.isEditable) { | ||
checkbox.checked = !checkbox.checked; | ||
return; | ||
} | ||
const { checked } = event.target; | ||
if (typeof getPos === 'function') { | ||
if (editor.isEditable && typeof getPos === 'function') { | ||
editor | ||
@@ -67,0 +73,0 @@ .chain() |
@@ -66,4 +66,10 @@ (function (global, factory) { | ||
checkbox.addEventListener('change', event => { | ||
// if the editor isn’t editable | ||
// we have to undo the latest change | ||
if (!editor.isEditable) { | ||
checkbox.checked = !checkbox.checked; | ||
return; | ||
} | ||
const { checked } = event.target; | ||
if (typeof getPos === 'function') { | ||
if (editor.isEditable && typeof getPos === 'function') { | ||
editor | ||
@@ -70,0 +76,0 @@ .chain() |
{ | ||
"name": "@tiptap/extension-task-item", | ||
"description": "task item extension for tiptap", | ||
"version": "2.0.0-beta.15", | ||
"version": "2.0.0-beta.16", | ||
"homepage": "https://tiptap.dev", | ||
@@ -29,3 +29,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "6b154e4c8161fbba987e162ebebc155243432f24" | ||
"gitHead": "5b9395ee742838b542dad5182e014a8146b40116" | ||
} |
@@ -89,5 +89,13 @@ import { Node, mergeAttributes } from '@tiptap/core' | ||
checkbox.addEventListener('change', event => { | ||
// if the editor isn’t editable | ||
// we have to undo the latest change | ||
if (!editor.isEditable) { | ||
checkbox.checked = !checkbox.checked | ||
return | ||
} | ||
const { checked } = event.target as any | ||
if (typeof getPos === 'function') { | ||
if (editor.isEditable && typeof getPos === 'function') { | ||
editor | ||
@@ -94,0 +102,0 @@ .chain() |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49050
515