Skip to content

Commit

Permalink
Merge pull request #10834 from Prinzhorn/master
Browse files Browse the repository at this point in the history
Only preventDefault on click on [data-toggle="modal"] when the element is a link
  • Loading branch information
fat committed Dec 27, 2013
2 parents 0bcc5a2 + 12a3bb3 commit bea46fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())

e.preventDefault()
if ($this.is('a')) e.preventDefault()

$target
.modal(option, this)
Expand Down

0 comments on commit bea46fc

Please sign in to comment.