Skip to content

Commit

Permalink
avoid "code" bloc to have sub elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Censseo committed Sep 28, 2020
1 parent e9f4fcf commit 9fc30aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/desktop/tools/scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ function initScenarioEditorEvents() {
scenarioContainer.off('focus', ':input').on('focus', ':input', function () {
blocFocusing($(this), false);
if ($(this).closest(".expression").find(".expressionAttr[data-l1key='type']").filter(function () {
return this.value == 'condition'
return this.value == 'condition' || this.value == 'code'
}).length == 0) {
BLOC_LAST_FOCUS = false;
} else {
Expand Down Expand Up @@ -2468,7 +2468,7 @@ function blocFocusing(bloc, onlyBloc) {
BLOC_FOCUS.addClass("scenario-bloc-focused");
if (!onlyBloc) {
if (bloc.closest(".expression").find(".expressionAttr[data-l1key='type']").filter(function () {
return this.value == 'condition'
return this.value == 'condition' || this.value == 'code'
}).length == 0) {
ACTION_FOCUS = bloc.closest('.expression');
ACTION_FOCUS.addClass("scenario-action-focused");
Expand Down

0 comments on commit 9fc30aa

Please sign in to comment.