angular-modal-service icon indicating copy to clipboard operation
angular-modal-service copied to clipboard

Fixed: Removed remaining modal, backdrop elements on closeModal function

Open michaeljymsgutierrez opened this issue 7 years ago • 5 comments

Added total removal of elements on modal from DOM. In some situation the closeModal function didn't remove all modal elements instead there are some remaining on DOM especially the backdrop and multiple creation of modal when used on same controller with others.

michaeljymsgutierrez avatar Oct 12 '17 09:10 michaeljymsgutierrez

Coverage Status

Coverage decreased (-0.8%) to 83.908% when pulling a825acc96460831ccfa597aeb03d6ffb24342a72 on michaeljymsgutierrez:remove-remaining-modal-elements-onclose into 2db21c5ddf36453a32760bf5490ca596fd0c19be on dwmkerr:master.

coveralls avatar Oct 12 '17 09:10 coveralls

Coverage Status

Coverage increased (+0.7%) to 85.393% when pulling efe663d9235f0873610cd04a691d0442dbeb540e on michaeljymsgutierrez:remove-remaining-modal-elements-onclose into 2db21c5ddf36453a32760bf5490ca596fd0c19be on dwmkerr:master.

coveralls avatar Oct 13 '17 09:10 coveralls

Looks good to me, although the library is not bootstrap specific and this assumes the modals are bootstrap modals, any thoughts on how we can keep it generic?

dwmkerr avatar Oct 30 '17 18:10 dwmkerr

Yeah but, for some reason most used library for modal system is bootstrap modal ? with same classes used.I think it is generic for now. And in what I have encounter using your awesome library, this fixed save my day.

michaeljymsgutierrez avatar Oct 31 '17 04:10 michaeljymsgutierrez

What about adding a flag to the options, perhaps a boolean called something like bootstrap, and then if the flag is present we can do the angular specific cleanup

dwmkerr avatar Nov 08 '17 02:11 dwmkerr