Try our conversational search powered by Generative AI!

CMS UI still manipulates the DOM when setting renderer="none"

Fixed in

EPiServer.CMS.UI 11.11.0

(Or a related package)

Created

Sep 18, 2018

Updated

Dec 20, 2018

Area

CMS UI

State

Closed, Fixed and tested


Description

Steps to reproduce:
1. Add a regular string property to a page model:

        public virtual string TestProperty { get; set; }

2. Render it in a view with the properties data-epi-property-name="NameHere" and data-epi-edittype="floating":

<span id="prop1" data-epi-property-name="TestProperty" data-epi-property-render="none" data-epi-property-edittype="floating" >@Model.CurrentPage.TestProperty</span>

3. Optional: If running CMS UI 11.11.0, override the fix for CMS-11703.

<style>
[data-epi-property-name] {
    min-width: 0;
    min-height: 0;
}
</style>

4. Open the page in OPE and edit the TestProperty.
5. Inspect the DOM element. Note no inline styles.
6. Clear the TestProperty and reload the page.
7. Inspect the DOM element.

Expected:
No inline styles on the element.

Actual:
There are inline styles:

style="min-height: 14px; min-width: 18px; display: inline-block;"