Skip to content

Commit

Permalink
[VUE] Experience Editor controls does not work until hard reload is d…
Browse files Browse the repository at this point in the history
…one (#951)
  • Loading branch information
illiakovalenko authored Mar 16, 2022
1 parent fe561fe commit 1b5a46a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/sitecore-jss-vue/src/components/PlaceholderCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Item,
RouteData,
} from '@sitecore-jss/sitecore-jss/layout';
import { HorizonEditor, resetEditorChromes } from '@sitecore-jss/sitecore-jss/utils';
import { resetEditorChromes } from '@sitecore-jss/sitecore-jss/utils';
import { Component, h, VNode, DefineComponent, ref, onMounted } from 'vue';
import { MissingComponent } from './MissingComponent';
import { HiddenRendering, HIDDEN_RENDERING_NAME } from './HiddenRendering';
Expand Down Expand Up @@ -218,9 +218,10 @@ function createRawElement(elem: any) {
) {
elRef.value.setAttribute('key', elem.attributes.key);

if (elRef && HorizonEditor.isActive()) {
resetEditorChromes();
}
// Reset chromes since sometimes experience editor script is executed earlier
// than Vue script and EE can't set required attributes and chromes aren't visible
// Also required for Horizon
resetEditorChromes();
}
});

Expand Down

0 comments on commit 1b5a46a

Please sign in to comment.