Fix modal and popup opening at the same time.

master
Fabio Caccamo 2022-12-19 15:31:02 +01:00
parent 8e0d8893c2
commit cc79cf1549
1 changed files with 1 additions and 0 deletions

View File

@ -129,6 +129,7 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
var el = $(selector); var el = $(selector);
el.removeAttr('onclick'); el.removeAttr('onclick');
el.unbind('click'); el.unbind('click');
el.click(data, presentRelatedObjectModal);
// listen the event on document for handling it on elements will be added to the DOM later // listen the event on document for handling it on elements will be added to the DOM later
$(document).on('click', selector, data, presentRelatedObjectModal); $(document).on('click', selector, data, presentRelatedObjectModal);
} }