Commit 84a76f60 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1690232: Comments link on retractable block failing to open modal

Actually the modal is opening and closing in the same instant.

This is caused by some code dealing with collapsible blocks making
sure modals are closed if outside certain rules.

This change checks what modal we are wanting and closing all but the
one are targeting when clicking the 'comments' link


Sponsored by SWITCH

Change-Id: Idb5165bdc8349f77286aa776ff75d152968aefda
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
(cherry picked from commit 5ce66781)
(cherry picked from commit b2858fcf)
parent 6ac1d317
......@@ -219,8 +219,12 @@ jQuery(function($) {
$('.block.collapse').on('click',function(e) {
var dialog = $('.modal-dialog'),
dialogParent = $('.modal-dialog').length;
if( !== dialog && !dialogParent){
// If we have a link to a comments dialog within a collapsible block
// We need to close all of them except for the one we just
// clicked for
var collapseModalTarget = $('target');
var wantedDialog = $(collapseModalTarget);
if ( !== dialog && !wantedDialog.length && !dialogParent) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment