Skip to content

Region dom structure changes between edit and other modes #252

@ComLock

Description

@ComLock

This need to be wrapped in a div.
https://github.com/enonic/npm-react-components/blame/556ec5df8f46d43510bccc4558f80a00d093fc16/src/ComponentRegistry/ComponentWrapper.tsx#L22

Like here:
https://github.com/enonic/npm-react-components/blame/556ec5df8f46d43510bccc4558f80a00d093fc16/src/ComponentRegistry/ComponentWrapper.tsx#L36-L43

Let's say you have a region using display:flex
And a part with padding

Here the padding will work:

<region>
<div>
<part/>
</div>
</region>

Here display flex will override the padding:

<region>
<part/>
</region>

Which means styling will work differently between edit and other modes.

Only the data-portal-component-type attribute can be removed outside edit mode. The div must always be there.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions