Skip to content

[5.2.0]: LivePreview markup differs from Preview, missing styles #15640

@superextinct

Description

@superextinct

What happened?

Description

Solspace Calendar includes a live preview for their Event elements. When opening the preview, the editor panel is not scrollable and is missing some padding:

craft-calendar-test ddev site_admin_calendar_events_2_default

Live Preview gets initiated here through Craft.LivePreview.init, that's why I'm opening the issue here.

I believe this to be caused by this commit e1d523a

While the new .lp-content class was introduced to the Preview class, it's not being used for LivePreview:

Bildschirmfoto 2024-09-02 um 13 03 51

Steps to reproduce

  1. Install Solspace Calendar
  2. Configure a preview target for the default calendar (/admin/calendar/calendars/default)
  3. Create and save a valid event
  4. Open Live Preview

Expected behavior

All fields should be visible, the editor panel should have horizontal padding and can be scrolled.

Actual behavior

Due to the missing padding, some fields are not fully visible. The panel cannot be scrolled.

Craft CMS version

5.2.0

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

  • "solspace/craft-calendar": "^5.0.7"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions