Skip to content

Commit 9fc30aa

Browse files
committed
avoid "code" bloc to have sub elements
1 parent e9f4fcf commit 9fc30aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/js/desktop/tools/scenario.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ function initScenarioEditorEvents() {
744744
scenarioContainer.off('focus', ':input').on('focus', ':input', function () {
745745
blocFocusing($(this), false);
746746
if ($(this).closest(".expression").find(".expressionAttr[data-l1key='type']").filter(function () {
747-
return this.value == 'condition'
747+
return this.value == 'condition' || this.value == 'code'
748748
}).length == 0) {
749749
BLOC_LAST_FOCUS = false;
750750
} else {
@@ -2468,7 +2468,7 @@ function blocFocusing(bloc, onlyBloc) {
24682468
BLOC_FOCUS.addClass("scenario-bloc-focused");
24692469
if (!onlyBloc) {
24702470
if (bloc.closest(".expression").find(".expressionAttr[data-l1key='type']").filter(function () {
2471-
return this.value == 'condition'
2471+
return this.value == 'condition' || this.value == 'code'
24722472
}).length == 0) {
24732473
ACTION_FOCUS = bloc.closest('.expression');
24742474
ACTION_FOCUS.addClass("scenario-action-focused");

0 commit comments

Comments
 (0)