ehpc / bootstrap-waitingfor

"Waiting for..." modal dialog with progress bar for Bootstrap
MIT License
138 stars 82 forks source link

Fixing duplicating content #10

Closed bertoost closed 8 years ago

bertoost commented 8 years ago

Fixed duplicating content when re-call waitingDialog on same page (append/prepend replaced with html) and reset the body before re-generating. Progress bar also as separated variable.

bertoost commented 8 years ago

Sorry for the spaces/tabs. It's how my IDE is configured (PSR default)

ehpc commented 8 years ago

Hey, bertoost! Thanks for the contribution :smile: But I thought I've fixed this issue in one of the previous commits. Did you sync your local repo with the current head before making changes? If not, can you please sync it and then reapply your changes? And if you did, can you point me to line numbers in your file that I should look for. Thanks!

bertoost commented 8 years ago

I don't have a fork.. just edited the file online. It's just about the lines with .prepend() and append(). which are replaced by html() and before to reset the modal-body html, and the process-bar is being appended afterwards, because of the replace of the modal-body.

The issue is when you open the modal twice or more after eachother without refreshing the page, it adds the message/header instead of replacing it, since the dom elements are not removed at hide...

ehpc commented 8 years ago

Can you write a testcase so I can reproduce the problem? I did "show" and "hide" multiple times in sequence and haven't noticed anything unusual.