mirror of
https://github.com/moodle/moodle.git
synced 2025-03-20 07:30:01 +01:00
MDL-75870 course: only section togglers to toggle sections
This commit is contained in:
parent
67bbf6c416
commit
e4e7ec5efb
2
course/format/amd/build/local/content.min.js
vendored
2
course/format/amd/build/local/content.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -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) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user