From 5d470b2c4f3e67cfb6bef0f14034a0f10d644c5a Mon Sep 17 00:00:00 2001 From: Alberto Vena Date: Sat, 31 Jan 2015 10:48:39 +0100 Subject: [PATCH] fixes modal window closing bug Closes #239 --- source/javascripts/refills/coffeescript/modal.coffee | 2 +- source/javascripts/refills/modal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/javascripts/refills/coffeescript/modal.coffee b/source/javascripts/refills/coffeescript/modal.coffee index 1310311c..e8d3c8a6 100644 --- a/source/javascripts/refills/coffeescript/modal.coffee +++ b/source/javascripts/refills/coffeescript/modal.coffee @@ -1,5 +1,5 @@ $ -> - $("#modal-1").on "click", -> + $("#modal-1").on "change", -> if $(this).is(":checked") $("body").addClass "modal-open" else diff --git a/source/javascripts/refills/modal.js b/source/javascripts/refills/modal.js index 3da37999..29937fc2 100644 --- a/source/javascripts/refills/modal.js +++ b/source/javascripts/refills/modal.js @@ -1,5 +1,5 @@ $(function() { - $("#modal-1").on("click", function() { + $("#modal-1").on("change", function() { if ($(this).is(":checked")) { $("body").addClass("modal-open"); } else {