lib/assets/javascripts/up/modal.js.coffee in upjs-rails-0.2.2 vs lib/assets/javascripts/up/modal.js.coffee in upjs-rails-0.3.0

- old
+ new

@@ -169,15 +169,17 @@ # Close the modal when someone clicks outside the dialog # (but not on a modal opener). up.on('click', 'body', (event, $body) -> $target = $(event.target) - unless $target.closest('.up-dialog').length || $target.closest('[up-modal]').length + unless $target.closest('.up-modal-dialog').length || $target.closest('[up-modal]').length close() ) up.bus.on('fragment:ready', ($fragment) -> unless $fragment.closest('.up-modal').length + console.log('fragment inserted', $fragment, $fragment.closest('.up-modal')) + # alert("autoclosing due to inserted fragment") autoclose() ) # Close the pop-up overlay when the user presses ESC. up.magic.onEscape(-> close())