fix isEditable

This commit is contained in:
Philipp Kühn
2020-08-21 22:08:54 +02:00
parent 65ed653d22
commit be6ee9853c
2 changed files with 8 additions and 6 deletions

View File

@@ -26,13 +26,12 @@ export default class Focus extends Extension {
return [
new Plugin({
props: {
decorations: ({ doc, plugins, selection }) => {
const { isFocused, isEditable } = this.editor
const isActive = isEditable && this.options.className
decorations: ({ doc, selection }) => {
const { isEditable, isFocused } = this.editor
const { anchor } = selection
const decorations: Decoration[] = []
if (!isActive || !isFocused) {
if (!isEditable || !isFocused) {
return
}