Do not add 'calendar/calendar.theme' to every page.

Created on 18 April 2023, about 2 years ago

Problem/Motivation

When inspecting code, the 🐛 Remove 'min-height: auto' . It is not supported by Firefox 22+ Fixed pops up, even if no calendar is displayed on the page.
(Not sure if I am running 8.x-2.x or 8.x-1.x)

Steps to reproduce

- Install Calendar module.
- Open a page with no Calendar (e.g., node edit)
- right click, 'open html source' and see that 'calendar.theme' is included in the page.

Proposed resolution

Move the following from the page to the Calendar element.

/**
 * Implements hook_page_attachments().
 */
function calendar_page_attachments(array &$page) {
  $page['#attached']['library'][] = 'calendar/calendar.theme';
}

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands johnv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024