Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VUE] Experience Editor controls does not work until hard reload is done #951

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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