Ensure that blocks always open automatically when added to block list or block grid (#14294)

This commit is contained in:
Kenn Jacobsen
2023-05-24 10:22:31 +02:00
committed by GitHub
parent 7e1620cbc3
commit 315f08c55d
2 changed files with 2 additions and 2 deletions

View File

@@ -1011,7 +1011,7 @@
blockObject = vm.layout[createIndex].$block;
}
// edit block if not `hideContentInOverlay` and there is content properties.
if(blockObject.hideContentInOverlay !== true && blockObject.content.variants[0].tabs[0]?.properties.length > 0) {
if(blockObject.hideContentInOverlay !== true && blockObject.content.variants[0].tabs.find(tab => tab.properties.length > 0) !== undefined) {
vm.options.createFlow = true;
blockObject.edit();
vm.options.createFlow = false;

View File

@@ -621,7 +621,7 @@
var blockObject = vm.layout[createIndex].$block;
if (inlineEditing === true) {
blockObject.activate();
} else if (inlineEditing === false && blockObject.hideContentInOverlay !== true && blockObject.content.variants[0].tabs[0]?.properties.length > 0) {
} else if (inlineEditing === false && blockObject.hideContentInOverlay !== true && blockObject.content.variants[0].tabs.find(tab => tab.properties.length > 0) !== undefined) {
vm.options.createFlow = true;
blockObject.edit();
vm.options.createFlow = false;