toodego: skip section toggling code in edit mode (#51437)

This commit is contained in:
Frédéric Péters 2021-02-25 12:21:41 +01:00
parent 2d75688ef4
commit 417f7571cd
1 changed files with 3 additions and 0 deletions

View File

@ -1145,6 +1145,9 @@ $(function() {
if ($(elem).find('.a11y-toggle-link').length) return;
var a = $(elem).append('<a class="a11y-toggle-link" href=""><span class="sr-only">plier/déplier la section</span></a>')
$(a).on('click', function() {
if ($(this).parents('.edit-mode').length) {
return true;
}
$(this).parent().trigger('click');
return false;
});