]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix issue with Reveal#destroy(). 8473/head
authorMarius Olbertz <marius.olbertz@gmail.com>
Sun, 27 Mar 2016 11:23:38 +0000 (13:23 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Sun, 27 Mar 2016 11:23:38 +0000 (13:23 +0200)
Moved $element outside of $overlay to prevent error unregisterPlugin().

js/foundation.reveal.js

index 5fb2f617e42713cc04657e526de58666095e3243..3918e0fa061cb141660bd5e4b012c35d6a7174b9 100644 (file)
@@ -440,6 +440,7 @@ class Reveal {
    */
   destroy() {
     if (this.options.overlay) {
+      this.$element.appendTo($('body')); // move $element outside of $overlay to prevent error unregisterPlugin()
       this.$overlay.hide().off().remove();
     }
     this.$element.hide().off();