Fixed a bug where opening a modal by data attributes would sometimes open it multiple times.

This commit is contained in:
Scott Erickson 2014-04-17 11:12:09 -07:00
parent 8859405e18
commit 8a2b762446

View file

@ -207,6 +207,7 @@ class CocoView extends Backbone.View
# Modals
toggleModal: (e) ->
return if visibleModal
if $(e.currentTarget).prop('target') is '_blank'
return true
# special handler for opening modals that are dynamically loaded, rather than static in the page. It works (or should work) like Bootstrap's modals, except use coco-modal for the data-toggle value.