bootstrap-modal icon indicating copy to clipboard operation
bootstrap-modal copied to clipboard

create modal and hide and show all script listener lost.

Open lxbzmy opened this issue 11 years ago • 4 comments

  • use js create modal and bind listener on content .
  • hide modal.
  • trigger show modal again. script bind lost.

because modal dom removed from dom tree. This not happened in official bootstrap-modal.

I add modal.appendTo($(document)); to removeContainer to solve problem

removeContainer: function (modal) {
            modal.appendTo($(document));
            modal.$container.remove();
            modal.$container = null;
        },

lxbzmy avatar Sep 15 '14 13:09 lxbzmy

I am having the same problem! script bind lost. Where did you add that function ? Thanks!

aricca avatar Sep 11 '15 16:09 aricca

removeContainer is a function from bootstrap-modalmanager.js.

lxbzmy avatar Sep 13 '15 12:09 lxbzmy

I tried adding it but I get the message: "Uncaught TypeError: modal.appendTo is not a function"

I am destroying the modal and recreating it, not the best.. but for now it works. I don't know if this maybe the same problem why I also get dropbox items cropped out of modal ...

aricca avatar Sep 16 '15 17:09 aricca

modal.$element.appendTo($('body')); 

my mistake.

lxbzmy avatar Sep 21 '15 11:09 lxbzmy