JS events were not attached to spans in modal window because all the html in the modal is added via AJAX requests, after the page has loaded. So we need to run clickhandlers() method when we open the modal.
z-index of modal window was greater than z-index of draggable elements. Elements were dragged under the modal.
We were relying on target id, but there were two droppable elements with the same id, at the same time (inputs in modal + inputs to add a rule). Elements were dropped in the wrong input.
Was not working for 3 reasons: