Merge branch 'MDL-75870-401' of https://github.com/nwp90/moodle into MOODLE_401_STABLE

This commit is contained in:
Andrew Nicols
2023-02-02 12:34:40 +08:00
3 changed files with 6 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -1
View File
@@ -158,7 +158,10 @@ export default class Component extends BaseComponent {
*/
_sectionTogglers(event) {
const sectionlink = event.target.closest(this.selectors.TOGGLER);
const isChevron = event.target.closest(this.selectors.COLLAPSE);
const closestCollapse = event.target.closest(this.selectors.COLLAPSE);
// Assume that chevron is the only collapse toggler in a section heading;
// I think this is the most efficient way to verify at the moment.
const isChevron = closestCollapse.closest(this.selectors.SECTION_ITEM);
if (sectionlink || isChevron) {