Ignore calls to eject via keyboard shortcut ctrl+e is not an ejectable block
This commit is contained in:
parent
47e04c363c
commit
ae1786786b
|
@ -32,8 +32,15 @@
|
||||||
await store.actions.components.paste(component, "below")
|
await store.actions.components.paste(component, "below")
|
||||||
},
|
},
|
||||||
["Ctrl+e"]: component => {
|
["Ctrl+e"]: component => {
|
||||||
|
const definition = store.actions.components.getDefinition(
|
||||||
|
component._component
|
||||||
|
)
|
||||||
|
const isBlock = definition?.block === true
|
||||||
|
const canEject = !(definition?.ejectable === false)
|
||||||
|
if (isBlock && canEject) {
|
||||||
componentToEject = component
|
componentToEject = component
|
||||||
confirmEjectDialog.show()
|
confirmEjectDialog.show()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
["Ctrl+Enter"]: () => {
|
["Ctrl+Enter"]: () => {
|
||||||
$goto(`./:componentId/new`)
|
$goto(`./:componentId/new`)
|
||||||
|
|
Loading…
Reference in New Issue