From aebdf82387db5d6b92d3291fa3758f6b659a54f8 Mon Sep 17 00:00:00 2001 From: Chiemezuo Date: Tue, 24 Oct 2023 22:50:21 +0100 Subject: [PATCH] Ensure that dropdown content will be scrollable if content is too high Fixes #11108 --- CHANGELOG.txt | 1 + client/scss/components/_dropdown.scss | 2 ++ docs/releases/6.1.md | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 84d91e985202..05084db92823 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -28,6 +28,7 @@ Changelog * Fix: Ensure form builder emails that have date or datetime fields correctly localize dates based on the configured `LANGUAGE_CODE` (Mark Niehues) * Fix: Ensure the Stimulus `UnsavedController` checks for nested removal/additions of inputs so that the unsaved warning shows in more valid cases when editing a page (Karthik Ayangar) * Fix: Ensure `get_add_url()` is always used to re-render the add button when the listing is refreshed in viewsets (Sage Abdullah) + * Fix: Ensure dropdown content cannot get higher than the viewport and add scrolling within content if needed (Chiemezuo Akujobi) * Docs: Add contributing development documentation on how to work with a fork of Wagtail (Nix Asteri, Dan Braghis) * Docs: Make sure the settings panel is listed in tabbed interface examples (Tibor Leupold) * Docs: Update content and page names to their US spelling instead of UK spelling (Victoria Poromon) diff --git a/client/scss/components/_dropdown.scss b/client/scss/components/_dropdown.scss index 4339bb934fb8..694c2aceb909 100644 --- a/client/scss/components/_dropdown.scss +++ b/client/scss/components/_dropdown.scss @@ -12,6 +12,8 @@ .w-dropdown__content { @apply w-flex w-flex-col w-justify-start w-py-2; + max-height: 50vh; + overflow-y: auto; } .w-dropdown__content :where(a, button) { diff --git a/docs/releases/6.1.md b/docs/releases/6.1.md index bd21f6109cae..b6eb836d513b 100644 --- a/docs/releases/6.1.md +++ b/docs/releases/6.1.md @@ -41,6 +41,7 @@ depth: 1 * Ensure form builder emails that have date or datetime fields correctly localize dates based on the configured `LANGUAGE_CODE` (Mark Niehues) * Ensure the Stimulus `UnsavedController` checks for nested removal/additions of inputs so that the unsaved warning shows in more valid cases when editing a page (Karthik Ayangar) * Ensure `get_add_url()` is always used to re-render the add button when the listing is refreshed in viewsets (Sage Abdullah) + * Ensure dropdown content cannot get higher than the viewport and add scrolling within content if needed (Chiemezuo Akujobi) ### Documentation