Fix modal and popup opening at the same time.

This commit is contained in:
Fabio Caccamo
2022-12-19 15:31:02 +01:00
parent 8e0d8893c2
commit cc79cf1549
@@ -129,6 +129,7 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
var el = $(selector);
el.removeAttr('onclick');
el.unbind('click');
el.click(data, presentRelatedObjectModal);
// listen the event on document for handling it on elements will be added to the DOM later
$(document).on('click', selector, data, presentRelatedObjectModal);
}