mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 09:25:29 +08:00
parent
33de6fef67
commit
d122980cec
@ -15,6 +15,11 @@ context('/src/GuideContent/ReadOnly/React/', () => {
|
||||
cy.get('.tiptap').type('Edited: ')
|
||||
|
||||
cy.get('.tiptap p:first').should('not.contain', 'Edited: ')
|
||||
|
||||
cy
|
||||
.get('.tiptap')
|
||||
.invoke('attr', 'tabindex')
|
||||
.should('not.exist')
|
||||
})
|
||||
})
|
||||
|
||||
@ -24,6 +29,11 @@ context('/src/GuideContent/ReadOnly/React/', () => {
|
||||
cy.get('.tiptap').type('Edited: ')
|
||||
|
||||
cy.get('.tiptap p:first').should('contain', 'Edited: ')
|
||||
|
||||
cy
|
||||
.get('.tiptap')
|
||||
.invoke('attr', 'tabindex')
|
||||
.should('eq', '0')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -10,7 +10,7 @@ export const Tabindex = Extension.create({
|
||||
new Plugin({
|
||||
key: new PluginKey('tabindex'),
|
||||
props: {
|
||||
attributes: this.editor.isEditable ? { tabindex: '0' } : {},
|
||||
attributes: (): { [name: string]: string; } => (this.editor.isEditable ? { tabindex: '0' } : {}),
|
||||
},
|
||||
}),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user