diff --git a/admin/tool/dataprivacy/classes/output/data_requests_table.php b/admin/tool/dataprivacy/classes/output/data_requests_table.php index 51bb1330911..ab40140bb9b 100644 --- a/admin/tool/dataprivacy/classes/output/data_requests_table.php +++ b/admin/tool/dataprivacy/classes/output/data_requests_table.php @@ -220,6 +220,7 @@ class data_requests_table extends table_sql { $actionsmenu->set_menu_trigger(get_string('actions')); $actionsmenu->set_owner_selector('request-actions-' . $requestid); $actionsmenu->set_alignment(\action_menu::TL, \action_menu::BL); + $actionsmenu->set_constraint('[data-region=data-requests-table] > .no-overflow'); return $OUTPUT->render($actionsmenu); } diff --git a/admin/tool/dataprivacy/styles.css b/admin/tool/dataprivacy/styles.css index a3510528a4e..e6ddf934b25 100644 --- a/admin/tool/dataprivacy/styles.css +++ b/admin/tool/dataprivacy/styles.css @@ -24,3 +24,7 @@ dd a.contactdpo { /* Reverting dd's left margin */ margin-left: inherit; } + +[data-region="data-requests-table"] .moodle-actionmenu { + min-width: 150px; +} diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index dc90aea8997..d4850dab21b 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -4389,6 +4389,9 @@ class action_menu implements renderable, templatable { * The constraint is applied when the dialogue is shown and limits the display of the dialogue to within the * element the constraint identifies. * + * This is required whenever the action menu is displayed inside any CSS element with the .no-overflow class + * (flexible_table and any of it's child classes are a likely candidate). + * * @param string $ancestorselector A snippet of CSS used to identify the ancestor to contrain the dialogue to. */ public function set_constraint($ancestorselector) { diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 53e5411f775..42dee5d4dd0 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -286,8 +286,10 @@ form.popupform div { overflow: auto; } +// Minimum height required for a menu in a table inside a scrollable div. .no-overflow > .generaltable { margin-bottom: 0; + min-height: 10em; } // Accessibility features diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 84ffc1210ea..898f7f220a5 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -8999,7 +8999,8 @@ form.popupform div { overflow: auto; } .no-overflow > .generaltable { - margin-bottom: 0; } + margin-bottom: 0; + min-height: 10em; } .accesshide { position: absolute; diff --git a/theme/bootstrapbase/less/moodle/core.less b/theme/bootstrapbase/less/moodle/core.less index ab8a4ee1505..a50887ff2a8 100644 --- a/theme/bootstrapbase/less/moodle/core.less +++ b/theme/bootstrapbase/less/moodle/core.less @@ -376,8 +376,10 @@ form.popupform div { .pagelayout-report .no-overflow { overflow: visible; } +// Minimum height required for a menu in a table inside a scrollable div. .no-overflow > .generaltable { margin-bottom: 0; + min-height: 10em; } // Accessibility features diff --git a/theme/bootstrapbase/style/moodle.css b/theme/bootstrapbase/style/moodle.css index e66b22ec729..7edf35ac46c 100644 --- a/theme/bootstrapbase/style/moodle.css +++ b/theme/bootstrapbase/style/moodle.css @@ -2678,6 +2678,7 @@ form.popupform div { } .no-overflow > .generaltable { margin-bottom: 0; + min-height: 10em; } .accesshide { position: absolute;