diff --git a/CHANGELOG.md b/CHANGELOG.md index 6db36e79ed..a400890bd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -94,6 +94,7 @@ This project does NOT adhere to [Semantic Versioning](https://semver.org/spec/v2 * Console error when /graphql requested in EE, localhost or horizon ([#803](https://github.com/Sitecore/jss/pull/803)) `[vue]` +* Experience Editor controls does not work until hard reload is done ([#950](https://github.com/Sitecore/jss/pull/950)) * Styleguide-Layout-Reuse breaks EE ([#938](https://github.com/Sitecore/jss/pull/938)) * The page is redirected to the home page of the website after clicking the "Change associated content" button in the Experience Editor ([#907](https://github.com/Sitecore/jss/pull/907)) * Cannot add a new rendering to the newly created ([#903](https://github.com/Sitecore/jss/pull/903)) diff --git a/packages/sitecore-jss-vue/src/components/PlaceholderCommon.ts b/packages/sitecore-jss-vue/src/components/PlaceholderCommon.ts index 64327fc8b9..564562a422 100644 --- a/packages/sitecore-jss-vue/src/components/PlaceholderCommon.ts +++ b/packages/sitecore-jss-vue/src/components/PlaceholderCommon.ts @@ -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'; @@ -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(); } });